title: Shift Swift Array
body: <h2>Array of Colors</h2>
  
  <pre><code>let colorArray = [
      UIColor.redColor(),
      UIColor.orangeColor(),
      UIColor.yellowColor(),
      UIColor.greenColor(),
      UIColor.blueColor()
  ]
  </code></pre>
  
  <p>The goal is to <em>shift</em> the array: </p>
  
  <ol>
  <li>To start with a different color.</li>
  <li>To preserve the circular order of colors.</li>
  </ol>
  
  <h2>Example #1</h2>
  
  <p>If we wanted to start with the <strong>orange color</strong> (the color at index 1 in the original array), the array would look like this:</p>
  
  <pre><code>let colorArray = [
      UIColor.orangeColor(),
      UIColor.yellowColor(),
      UIColor.greenColor(),
      UIColor.blueColor(),
      UIColor.redColor(),
  ]
  </code></pre>
  
  <h2>Example #2</h2>
  
  <p>If we wanted to start with the <strong>green color</strong> (the color at index 3 in the original array), the array would look like this:</p>
  
  <pre><code>let colorArray = [
      UIColor.greenColor(),
      UIColor.blueColor(),
      UIColor.redColor(),
      UIColor.orangeColor(),
      UIColor.yellowColor()
  ]
  </code></pre>