anchor.diff:      | [] -> acc
       | x::xs -> foldIndexedAux f (i+1) (f i acc x) xs
   
  -let foldIndexed<'a,'acc> f (seed:'acc) (xs: 'a list) =
  -    foldIndexedAux f 0 seed xs
  -
  -let fold<'a,'acc> f (seed:'acc) (xs: 'a list) =
  -    foldIndexed (fun _ acc x -> f acc x) seed xs
  +let foldIndexed<'a,'acc> f (state: 'acc) (xs: 'a list) =
  +    foldIndexedAux f 0 state xs
  +
  +let rec fold<'a,'acc> f (state: 'acc) (xs: 'a list) =
  +    match xs with
  +    | [] -> state
  +    | h::t -> fold f (f state h) t
   
   let reverse xs =
       fold (fun acc x -> x::acc) [] xs
   
  -let foldBack<'a,'acc> f (xs: 'a list) (seed:'acc) =
  -    fold (fun acc x -> f x acc) seed (reverse xs)
  +let foldBack<'a,'acc> f (xs: 'a list) (state: 'acc) =
  +    fold (fun acc x -> f x acc) state (reverse xs)
  +
  +let toSeq (xs: 'a list): 'a seq =
  +    Seq.map id xs
  +
  +let ofSeq (xs: 'a seq): 'a list =
  +    Seq.fold (fun acc x -> x::acc) [] xs
  +    |> reverse
  +
  +let concat (lists : #seq<'a list>) =
  +    Seq.fold (fold (fun acc x -> x::acc)) [] lists
  +    |> reverse
   
   let rec foldIndexed2Aux f i acc bs cs =
       match bs, cs with
  
positive.code:     | 1, x::xs -> [x],xs
      | i, xs -> takeSplitAux true i [] xs
  
  let toSeq (xs: 'a list): 'a seq =
      Seq.unfold (function [] -> None | x::xs -> Some(x, xs)) xs
  
  let ofSeq (xs: 'a seq): 'a list =
      Seq.foldBack(fun x acc -> x::acc) xs []
  
  let concat (lists : #seq<'a list>) =
      Seq.foldBack (List.foldBack (fun x acc -> x::acc)) lists []
  
  let slice (lower: int option) (upper: int option) (xs: 'T list) =
      let lower = defaultArg lower -1
      let upper = defaultArg upper -1
  
negative.code: let foldIndexed3<'a, 'b, 'c, 'acc> f (seed:'acc) (xs: 'a list) (ys: 'b list) (zs: 'c list) =
      foldIndexed3Aux f 0 seed xs ys zs
  
  let fold3<'a, 'b, 'c, 'acc> f (state: 'acc) (xs: 'a list) (ys: 'b list) (zs: 'c list) =
      foldIndexed3 (fun _ acc x y z -> f acc x y z) state xs ys zs
  
  let scan<'a, 'acc> f (state: 'acc) (xs: 'a list) =
      Seq.scan f state xs |> ofSeq
  
  let scanBack<'a, 'acc> f (xs: 'a list) (state: 'acc) =
      Seq.scanBack f xs state |> ofSeq
  
  let length xs =
      fold (fun acc _ -> acc + 1) 0 xs
  