anchor.diff:      /// Applies a function to each element of the collection, threading an accumulator argument through the computation.
       /// The integer index passed to the function indicates the array index of the element being transformed.
       /// The index values are tagged with a unit-of-measure type before applying them to the folder function.
  -    [<CompiledName("FoldIndexedByTag")>]
  -    let foldti (folder : int<'Tag> -> 'State -> 'T -> 'State) (state : 'State) (arr : 'T[]) =
  +    [<CompiledName("FoldIndexed")>]
  +    let foldi (folder : int<'Tag> -> 'State -> 'T -> 'State) (state : 'State) (arr : 'T[]) =
  +        // Preconditions
           checkNonNull "arr" arr
  +        
           let folder = OptimizedClosures.FSharpFunc<_,_,_,_>.Adapt folder
           let mutable state = state
           let len = arr.Length
  
positive.code:     /// Expands an array by creating a copy of it which has
      /// the specified number of empty elements appended to it.
      [<CompiledName("ExpandRight")>]
      let expandRight count (arr : 'T[]) =
          // Preconditions
          if count < 0 then
              invalidArg "count" "The number of elements to expand the array by is negative."
  
          // Create the new "expanded" array. Copy the elements from the original array
          // into the "left" side of the new array, then return the expanded array.
          let expandedArr = Array.zeroCreate (arr.Length + count)        
          Array.blit arr 0 expandedArr 0 arr.Length
          expandedArr
  
      /// Expands an array by creating a copy of it which has
      /// the specified number of empty elements prepended to it.
      [<CompiledName("ExpandLeft")>]
      let expandLeft count (arr : 'T[]) =
          // Preconditions
          if count < 0 then
              invalidArg "count" "The number of elements to expand the array by is negative."
  
          // Create the new "expanded" array. Copy the elements from the original array
          // into the "right" side of the new array, then return the expanded array.
          let expandedArr = Array.zeroCreate (arr.Length + count)
          Array.blit arr 0 expandedArr count arr.Length
          expandedArr
  
      //
  
negative.code:     let [<NoDynamicInvocation>] inline sortInPlaceWith (comparer : 'T -> 'T -> int) (resizeArray : ResizeArray<'T>) =
          resizeArray.Sort (comparer)
  
      //
      [<CompiledName("Contains")>]
      let inline contains (value : 'T) (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          resizeArray.Contains value
  
      //
      [<CompiledName("Filter")>]
      let inline filter (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : ResizeArray<'T> =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          resizeArray.FindAll (System.Predicate predicate)
  
      //
      [<CompiledName("Exists")>]
      let inline exists (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : bool =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          resizeArray.Exists (System.Predicate predicate)
  
      //
      [<CompiledName("Forall")>]
      let inline forall (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : bool =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          resizeArray.TrueForAll (System.Predicate predicate)
  
      //
      [<CompiledName("TryFindIndex")>]
      let tryFindIndex (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : int option =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          match resizeArray.FindIndex (System.Predicate predicate) with
          | -1 ->
              None
          | index ->
              Some index
  
      //
      [<CompiledName("TryFind")>]
      let tryFind (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : 'T option =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          match resizeArray.FindIndex (System.Predicate predicate) with
          | -1 ->
              None
          | index ->
              Some resizeArray.[index]
          
      //
      [<CompiledName("FindIndex")>]
      let findIndex (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : int =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          match resizeArray.FindIndex (System.Predicate predicate) with
          | -1 ->
              raise <| System.Collections.Generic.KeyNotFoundException ()
          | index ->
              index
  
      //
      [<CompiledName("Find")>]
      let find (predicate : 'T -> bool) (resizeArray : ResizeArray<'T>) : 'T =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          match resizeArray.FindIndex (System.Predicate predicate) with
          | -1 ->
              raise <| System.Collections.Generic.KeyNotFoundException ()
          | index ->
              resizeArray.[index]
  
      //
      [<CompiledName("Map")>]
      let inline map (mapping : 'T -> 'U) (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          resizeArray.ConvertAll (System.Converter mapping)
  
      //
      [<CompiledName("MapIndexed")>]
      let mapi (mapping : int -> 'T -> 'U) (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let mapping = FSharpFunc<_,_,_>.Adapt mapping
          let count = resizeArray.Count
          let result = ResizeArray (count)
  
          for i = 0 to count - 1 do
              result.Add <| mapping.Invoke (i, resizeArray.[i])
          result
  
      //
      [<CompiledName("Iterate")>]
      let iter (action : 'T -> unit) (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let count = resizeArray.Count
          for i = 0 to count - 1 do
              action resizeArray.[i]
  
      //
      [<CompiledName("IterateIndexed")>]
      let iteri (action : int -> 'T -> unit) (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let action = FSharpFunc<_,_,_>.Adapt action
  
          let count = resizeArray.Count
          for i = 0 to count - 1 do
              action.Invoke (i, resizeArray.[i])
  
      //
      [<CompiledName("Fold")>]
      let fold (folder : 'State -> 'T -> 'State) state (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let folder = FSharpFunc<_,_,_>.Adapt folder
  
          let mutable state = state
          let count = resizeArray.Count
          for i = 0 to count - 1 do
              state <- folder.Invoke (state, resizeArray.[i])
          state
  
      //
      [<CompiledName("FoldIndexed")>]
      let foldi (folder : int -> 'State -> 'T -> 'State) state (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let folder = FSharpFunc<_,_,_,_>.Adapt folder
  
          let mutable state = state
          let count = resizeArray.Count
          for i = 0 to count - 1 do
              state <- folder.Invoke (i, state, resizeArray.[i])
          state
  
      //
      [<CompiledName("FoldBack")>]
      let foldBack (folder : 'T -> 'State -> 'State) (resizeArray : ResizeArray<'T>) state =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let folder = FSharpFunc<_,_,_>.Adapt folder
  
          let mutable state = state
          for i = resizeArray.Count - 1 downto 0 do
              state <- folder.Invoke (resizeArray.[i], state)
          state
  
      //
      [<CompiledName("FoldBackIndexed")>]
      let foldiBack (folder : int -> 'T -> 'State -> 'State) (resizeArray : ResizeArray<'T>) state =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let folder = FSharpFunc<_,_,_,_>.Adapt folder
  
          let mutable state = state
          for i = resizeArray.Count - 1 downto 0 do
              state <- folder.Invoke (i, resizeArray.[i], state)
          state
  
      //
      [<CompiledName("Reduce")>]
      let reduce (reduction : 'T -> 'T -> 'T) (resizeArray : ResizeArray<'T>) =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
          if isEmpty resizeArray then
              invalidArg "resizeArray" "The ResizeArray is empty."
  
          let reduction = FSharpFunc<_,_,_>.Adapt reduction
  
          let mutable state = resizeArray.[0]
          let count = resizeArray.Count
          for i = 1 to count - 1 do
              state <- reduction.Invoke (state, resizeArray.[i])
          state
  
      //
      [<CompiledName("ReduceBack")>]
      let reduceBack (reduction : 'T -> 'T -> 'T) (resizeArray : ResizeArray<'T>) : 'T =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
          if isEmpty resizeArray then
              invalidArg "resizeArray" "The ResizeArray is empty."
  
          let reduction = FSharpFunc<_,_,_>.Adapt reduction
  
          let count = resizeArray.Count
          let mutable state = resizeArray.[count - 1]
  
          for i = count - 2 downto 0 do
              state <- reduction.Invoke (resizeArray.[i], state)
          state
  
      //
      [<CompiledName("Choose")>]
      let choose (chooser : 'T -> 'U option) (resizeArray : ResizeArray<'T>) : ResizeArray<'U> =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          // OPTIMIZATION : If the input list is empty return immediately.
          if isEmpty resizeArray then
              ResizeArray ()
          else
              let result = ResizeArray ()
              let count = resizeArray.Count
  
              for i = 0 to count - 1 do
                  match chooser resizeArray.[i] with
                  | None -> ()
                  | Some value ->
                      result.Add value
  
              result
  
      //
      [<CompiledName("TryPick")>]
      let tryPick (picker : 'T -> 'U option) (resizeArray : ResizeArray<'T>) : 'U option =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let count = resizeArray.Count
          let mutable result = None
          let mutable index = 0
  
          while index < count && Option.isNone result do
              result <- picker resizeArray.[index]
          result
  
      //
      [<CompiledName("Pick")>]
      let pick (picker : 'T -> 'U option) (resizeArray : ResizeArray<'T>) : 'U =
          // Preconditions
          checkNonNull "resizeArray" resizeArray
  
          let count = resizeArray.Count
          let mutable result = None
          let mutable index = 0
  
          while index < count && Option.isNone result do
              result <- picker resizeArray.[index]
  
          match result with
          | Some result ->
              result
          | None ->
              raise <| System.Collections.Generic.KeyNotFoundException ()
  
  
  /// Functional programming operators related to the System.Collections.Generic.IDictionary type.
  