title: How to remove range from an array
body: <p>I'm trying to find something equivalent to <code>remove_range</code> (which does not exist of course) as shown below. Seems there is no easy way to implement this functionality.</p>
  
  <pre><code>a = [0,2,8,2,4,5,]
  b = a.remove_range(1,2) #remove items between index 1 and 2 ,inclusively
  #expect b == [0,2,4,5]
  b = a.remove_range(3,4)
  #expect b == [0,2,8,5]
  </code></pre>
  
  <p><strong>Please test at least above two cases before posting your solution :)</strong> </p>
  
  <p>Suppose the size of the range is M, this operation should requires O(1) space and O(N-M) time complexity.</p>
  
  <p>EDIT:
  I see people keep posting the <code>a - a[range]</code>. But it is not correct, that is to remove the elements exists in a[range], not to remove the the element belongs to range.</p>
  
  <p><code>a - a[1..2]</code>  will return <code>[0, 4, 5]</code>. However,we want to keep the 3rd element which is <code>2</code>.</p>