anchor.diff:      /// Gets whether or not the Deque is empty.
       member this.IsEmpty = this.Count = 0
   
  -    member this.toBufferIndex index =
  -        (index + startOffset) &&& capacityClosestPowerOfTwoMinusOne
  -
  -    member this.iterate() =
  -        // The below is done for performance reasons.
  -        // Rather than doing bounds checking and modulo arithmetic
  -        // that would go along with calls to Get(index), we can skip
  -        // all of that by referencing the underlying array.
  -        seq {
  -            if startOffset + this.Count > this.Capacity then
  -            
  -                for i in startOffset..this.Capacity-1 do
  -                    yield buffer.[i]
  -
  -                let endIndex = this.toBufferIndex(this.Count - startOffset - 1)
  -
  -                for i in 0..endIndex-1 do
  -                    yield buffer.[i]           
  -            else            
  -                let endIndex = startOffset + this.Count
  -                for i in startOffset .. endIndex-1 do
  -                    yield buffer.[i]
  -        }
   
       /// Adds the provided item to the back of the Deque.
       member this.Add(item) =
           if this.Count >= this.Capacity then
  -            this.DoubleCapacity()
  +            doubleCapacity()
   
  -        buffer.[this.toBufferIndex(startOffset + this.Count)] <- item
  +        buffer.[toBufferIndex(startOffset + this.Count)] <- item
           count <- count + 1
   
       /// Removes an item from the front of the Deque and returns it.
  
positive.code:             raise <| new InvalidOperationException("The Deque is empty")
  
          count <- count - 1
          buffer.[this.toBufferIndex(this.Count)]
  
      /// Gets the value at the specified index of the Deque
      member this.Get(index) =
          if index >= this.Count then
              raise <| new IndexOutOfRangeException("The supplied index is greater than the Count")
  
          buffer.[this.toBufferIndex(index)]
  
      /// Gets the element at the front
      member this.First =
          if count = 0 then
              raise <| new InvalidOperationException("The Deque is empty")
  
          buffer.[this.toBufferIndex(0)]
  
      /// Gets the element at the end
      member this.Last =
          if count = 0 then
              raise <| new InvalidOperationException("The Deque is empty")
  
          buffer.[this.toBufferIndex(count - 1)]
  
      interface System.Collections.Generic.IEnumerable<'T> with
          member this.GetEnumerator() =
            this.iterate().GetEnumerator()
  
      interface System.Collections.IEnumerable with
          member this.GetEnumerator () =
            (this.iterate().GetEnumerator())
              :> System.Collections.IEnumerator        
  
negative.code:     let mutable count = 0
      let mutable capacityClosestPowerOfTwoMinusOne = 0
  
      let copyArray size =
          let newArray = Array.zeroCreate size
  
          if 0 <> startOffset && startOffset + count >= capacity then
              let lengthFromStart = capacity - startOffset
              let lengthFromEnd = count - lengthFromStart            
  
              Array.Copy(buffer, startOffset, newArray, 0, lengthFromStart)
  
              Array.Copy(buffer, 0, newArray, lengthFromStart, lengthFromEnd)
          else
              Array.Copy(buffer, startOffset, newArray, 0, count)
          newArray
  
      /// Sets the total number of elements the internal array can hold without resizing.
      let doubleCapacity() =
          if capacity < 0 then
              raise <| new ArgumentOutOfRangeException("value", "Capacity is less than 0.")
  
          if capacity < count then
              raise <| new InvalidOperationException("Capacity cannot be set to a value less than Count")
  
          if capacity <= buffer.Length then () else
  
          // Set up to use the new buffer.
          capacity <- capacity * 2
          buffer <- copyArray(capacity)
          capacityClosestPowerOfTwoMinusOne <- capacity - 1
          startOffset <- 0
  
  
      let toBufferIndex index = (index + startOffset) &&& capacityClosestPowerOfTwoMinusOne
  
      let iterate() =
          seq {
              if startOffset + count > capacity then
              
                  for i in startOffset..capacity-1 do
                      yield buffer.[i]
  
                  let endIndex = toBufferIndex(count - startOffset - 1)
  
                  for i in 0..endIndex-1 do
                      yield buffer.[i]           
              else            
                  let endIndex = startOffset + count
                  for i in startOffset .. endIndex-1 do
                      yield buffer.[i]
          }
  
      /// Creates a new Deque with the default capacity
      new() = Deque<'T>(16)
  
  