anchor.diff:  
               for i = 0 to len - 1 do
                   let result, state' = mapping.Invoke (LanguagePrimitives.Int32WithMeasure<'Tag> i, array.[i], state)
  -                results.[i] <- result
  -                state <- state'
  -
  -            results, state
  -
  -        /// A specialization of Array.map which threads an accumulator through the computation;
  -        /// this allows the use of mapping functions requiring a (possibly mutable) state variable.
  -        /// This function traverses the input array from right-to-left.
  -        [<CompiledName("MapBack")>]
  -        let mapBack (mapping : 'T -> 'State -> 'U * 'State) (array : 'T[]) (state : 'State) : 'U[] * 'State =
  -            // Preconditions
  -            checkNonNull "array" array
  -
  -            let mapping = FSharpFunc<_,_,_>.Adapt mapping
  -            let len = array.Length
  -            let results = Array.zeroCreate len
  -            let mutable state = state
  -
  -            for i = len - 1 downto 0 do
  -                let result, state' = mapping.Invoke (array.[i], state)
  -                results.[i] <- result
  -                state <- state'
  -
  -            results, state
  -
  -        /// A specialization of Array.mapi which threads an accumulator through the computation;
  -        /// this allows the use of mapping functions requiring a (possibly mutable) state variable.
  -        /// This function traverses the input array from right-to-left.
  -        [<CompiledName("MapIndexedBack")>]
  -        let mapiBack (mapping : int -> 'T -> 'State -> 'U * 'State) (array : 'T[]) (state : 'State) : 'U[] * 'State =
  -            // Preconditions
  -            checkNonNull "array" array
  -
  -            let mapping = FSharpFunc<_,_,_,_>.Adapt mapping
  -            let len = array.Length
  -            let results = Array.zeroCreate len
  -            let mutable state = state
  -
  -            for i = len - 1 downto 0 do
  -                let result, state' = mapping.Invoke (i, array.[i], state)
                   results.[i] <- result
                   state <- state'
   
  
positive.code:             innerState, outerState
  
  
      /// The TidePowerd.Core.Collections.ArraySegment module, lifted into the State monad.
      [<RequireQualifiedAccess; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
      module ArraySegment =
          /// A specialization of ArraySegment.iter which threads an accumulator through the computation; this allows
  
negative.code:             mapRec ([], state, list)
  
  
      /// The ExtCore.Collections.ArraySegment module, lifted into the ProtectedState monad.
      [<RequireQualifiedAccess; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
      module ArraySegment =
          /// A specialization of ArraySegment.iter which threads an accumulator through the computation and which also
  