anchor.diff:              state <- folder.Invoke (i, state, array.[i])
           state
   
  -    /// Applies a function to each element of the array, returning a new array whose elements are
  -    /// tuples of the original element and the function result for that element.
  -    [<CompiledName("ProjectValues")>]
  -    let projectValues (projection : 'Key -> 'U) (array : 'Key[]) =
  +    //
  +    [<CompiledName("FoldBackIndexed")>]
  +    let foldiBack (folder : int -> 'T -> 'State -> 'State) (array : 'T[]) (state : 'State) : 'State =
           // Preconditions
           checkNonNull "array" array
   
  -        array |> Array.map (fun x -> x, projection x)
  -
  -    //
  -    [<CompiledName("ProjectKeys")>]
  -    let projectKeys (projection : 'T -> 'Key) (array : 'T[]) =
  -        // Preconditions
  -        checkNonNull "array" array
  -
  -        array |> Array.map (fun x -> projection x, x)
  -
  -    /// Returns the first element in the array.
  -    let [<NoDynamicInvocation>] inline first (array : 'T[]) =
  -        if Array.isEmpty array then
  -            invalidOp "Cannot retrieve the first element of an empty array."
  -        else array.[0]
  -
  -    /// Returns the index of the last element in the array.
  -    let [<NoDynamicInvocation>] inline lastIndex (array : 'T[]) =
  -        if Array.isEmpty array then
  -            invalidOp "The array is empty."
  -        else array.Length - 1
  -
  -    /// Returns the last element in the array.
  -    let [<NoDynamicInvocation>] inline last (array : 'T[]) =
  -        if Array.isEmpty array then
  -            invalidOp "Cannot retrieve the last element of an empty array."
  -        else array.[array.Length - 1]
  +        let folder = FSharpFunc<_,_,_,_>.Adapt folder
  +        
  +        let mutable state = state
  +        for i = Array.length array - 1 downto 0 do
  +            state <- folder.Invoke (i, array.[i], state)
  +        state
   
       /// Splits an array into one or more arrays; the specified predicate is applied
       /// to each element in the array, and whenever it returns true, that element will
  
positive.code:         state
  
      // TODO :
      // foldBacki
      // foldPairs, foldBackPairs
      // derive    // takes a 'T -> 'T -> 'T like reduce, but only performs one step; used to perform 'divided differences'
  
  
  //
  
negative.code:     /// 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("FoldIndexed")>]
      let foldi (folder : int<'Tag> -> 'State -> 'T -> 'State) (state : 'State) (array : 'T[]) =
          // Preconditions
          checkNonNull "array" array
          
          let folder = OptimizedClosures.FSharpFunc<_,_,_,_>.Adapt folder
          let mutable state = state
          let len = Array.length array
          for i = 0 to len - 1 do
              state <- folder.Invoke (Int32WithMeasure<'Tag> i, state, array.[i])
          state
  
      /// 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("FoldBackIndexed")>]
      let foldiBack (folder : int<'Tag> -> 'T -> 'State -> 'State) (array : 'T[]) (state : 'State) : 'State =
          // Preconditions
          checkNonNull "array" array
  
          let folder = FSharpFunc<_,_,_,_>.Adapt folder
          
          let mutable state = state
          for i = Array.length array - 1 downto 0 do
              state <- folder.Invoke (Int32WithMeasure<'Tag> i, array.[i], state)
          state
  
  
  