anchor.diff:  let append xs ys =
       fold (fun acc x -> x::acc) ys (reverse xs)
   
  -let collect f xs =
  -    fold (fun acc x -> append (f x) acc) [] (reverse xs)
  +let collect f (xs: 'a list) =
  +    Seq.collect f xs |> ofSeq
   
   let map f xs =
  -    fold (fun acc x -> (f x::acc)) [] xs
  +    fold (fun acc x -> f x::acc) [] xs
       |> reverse
   
   let mapIndexed f xs =
  
positive.code:     | x::xs, y::ys -> foldIndexed2Aux f (i+1) (f i acc x y) xs ys
      | _ -> invalidOp "Lists had different lengths"
  
  let foldIndexed2<'a, 'b, 'acc> f (seed:'acc) (xs: 'a list) (ys: 'b list) =
      foldIndexed2Aux f 0 seed xs ys
  
  let fold2<'a, 'b, 'acc> f (seed:'acc) (xs: 'a list) (ys: 'b list) =
      foldIndexed2 (fun _ acc x y -> f acc x y) seed xs ys
  
  let foldBack2<'a, 'b, 'acc> f (xs: 'a list) (ys: 'b list) (seed:'acc) =
      fold2 (fun acc x y -> f x y acc) seed (reverse xs) (reverse ys)
  
  let unfold f state =
      let rec unfoldInner acc state =
          match f state with
          |None -> reverse acc
          |Some (x,state) -> unfoldInner (x::acc) state
      unfoldInner [] state
  
  let rec foldIndexed3Aux f i acc bs cs ds =
  
negative.code:     | 1, x::xs -> [x],xs
      | i, xs -> takeSplitAux true i [] xs
  
  let slice (lower: int option) (upper: int option) (xs: 'T list) =
      let lower = defaultArg lower -1
      let upper = defaultArg upper -1
  