title: Limit array size in swift
body: <p>Is there a way to limit array size in swift so that when you append elements to it when it's full, it doesn't append?</p>
  
  <p>I know this can be done programmatically. Wondering if swift has inbuilt handling for this.</p>
  
  <p>eg: </p>
  
  <p>array -> Array with size 10</p>
  
  <pre><code>array.append(1)
  
  .
  
  .
  
  .
  
  array.append(10)
  
  array.append(11) // Doesn't do anything?
  
  array.insert(0, pos: 0) 
  </code></pre>
  
  <p><strong>Use Case:</strong> Pushes the last element out of the array to make space for the new element?</p>
  
  <p>Edit - last line is the main use case.</p>