anchor.diff:  
   open System
   open System.Diagnostics
  +
  +
  +[<AutoOpen>]
  +module Prelude =
  +    /// obj.ReferenceEquals
  +    let inline (==) a b = obj.ReferenceEquals(a, b)
  +    /// LanguagePrimitives.PhysicalEquality
  +    let inline (===) a b = LanguagePrimitives.PhysicalEquality a b
  +    let inline debug msg = Printf.kprintf Debug.WriteLine msg
  +    let inline fail msg = Printf.kprintf Debug.Fail msg
  +    let inline isNull v = match v with | null -> true | _ -> false
  +    let inline isNotNull v = v |> (not << isNull)
   
   [<RequireQualifiedAccess>]
   [<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
  
positive.code:         | null -> nullArg argName 
          | _ -> ()
  
      /// Returns true if one array has another as its subset from index 0.
      let startsWith (prefix: _ []) (whole: _ []) =
          if prefix.Length = 0 then true
          elif prefix.Length > whole.Length then false
          elif prefix.Length = whole.Length then prefix = whole
          else Array.sub whole 0 prefix.Length = prefix
  
      /// Returns true if one array has trailing elements equal to another's.
      let endsWith (suffix: _ []) (whole: _ []) =
          if suffix.Length = 0 then true
          elif suffix.Length > whole.Length then false
          elif suffix.Length = whole.Length then suffix = whole
          else Array.sub whole (whole.Length-suffix.Length) suffix.Length = suffix
  
      /// Returns a new array with an element replaced with a given value.
      let replace index value (arr: _ []) =
          if index >= arr.Length then raise (IndexOutOfRangeException "index")
          let res = Array.copy arr
          res.[index] <- value
          res
  
      /// Returns all heads of a given array.
      /// For [|1;2;3|] it returns [|[|1; 2; 3|]; [|1; 2|]; [|1|]|]
      let heads (array: 'T []) =
          let res = Array.zeroCreate<'T[]> array.Length
          for i = array.Length - 1 downto 0 do
              res.[i] <- array.[0..i]
          res
  
      let foldi (folder : 'State -> int -> 'T -> 'State) (state : 'State) (array : 'T[]) =
          let mutable state = state
          let len = array.Length
          for i = 0 to len - 1 do
              state <- folder state i array.[i]
          state
  
      open System.Collections.Generic
  
      /// Returns an array that contains no duplicate entries according to generic hash and
      /// equality comparisons on the entries.
      /// If an element occurs multiple times in the array then the later occurrences are discarded.
      let distinct (array:'T[]) =
          checkNonNull "array" array
          let temp = Array.zeroCreate array.Length
          let mutable i = 0
  
          let hashSet = HashSet<'T>(HashIdentity.Structural<'T>)
          for v in array do 
              if hashSet.Add(v) then
                  temp.[i] <- v
                  i <- i + 1
  
          Array.sub temp 0 i 
  
      /// Optimized arrays equality. ~100x faster than `array1 = array2`.
      let inline areEqual (x: 'a[]) (y: 'a[]) =
          match x, y with
          | null, null -> true
  
negative.code:                 i <- i + 1
              result
  
  
      /// Returns true if one array has another as its subset from index 0.
      let startsWith (prefix: _ []) (whole: _ []) =        
          if isNull prefix || isNull whole then false
          elif prefix.Length = 0 then true
          elif prefix.Length > whole.Length then false
          elif prefix.Length = whole.Length then areEqual prefix whole
          else areEqual whole.[0..prefix.Length-1] prefix
  
  
      /// Returns true if one array has trailing elements equal to another's.
      let endsWith (suffix: _ []) (whole: _ []) =
          if isNull suffix || isNull whole then false
          elif suffix.Length = 0 then true
          elif suffix.Length > whole.Length then false
          elif suffix.Length = whole.Length then areEqual suffix whole
          else areEqual whole.[whole.Length-suffix.Length..whole.Length-1] suffix
  
  
      /// Returns a new array with an element replaced with a given value.
      let replace index value (arr: _ []) =
          if index >= arr.Length then raise (IndexOutOfRangeException "index")
          let res = Array.copy arr
          res.[index] <- value
          res
  
      /// Returns all heads of a given array.
      /// For [|1;2;3|] it returns [|[|1; 2; 3|]; [|1; 2|]; [|1|]|]
      let heads (array: 'T []) =
          let res = Array.zeroCreate<'T[]> array.Length
          for i = array.Length - 1 downto 0 do
              res.[i] <- array.[0..i]
          res
  
      /// Fold over the array passing the index and element at that index to a folding function
      let foldi (folder : 'State -> int -> 'T -> 'State) (state : 'State) (array : 'T[]) =
          let folder = OptimizedClosures.FSharpFunc<_,_,_,_>.Adapt folder
          let mutable state = state
          let len = array.Length
          for i = 0 to len - 1 do
              state <- folder.Invoke (state, i, array.[i])
          state
  
      open System.Collections.Generic
  
      /// Returns an array that contains no duplicate entries according to generic hash and
      /// equality comparisons on the entries.
      /// If an element occurs multiple times in the array then the later occurrences are discarded.
      let distinct (array:'T[]) =
          checkNonNull "array" array
          let temp = Array.zeroCreate array.Length
          let mutable i = 0
  
          let hashSet = HashSet<'T>(HashIdentity.Structural<'T>)
          for v in array do 
              if hashSet.Add(v) then
                  temp.[i] <- v
                  i <- i + 1
  
          Array.sub temp 0 i 
  
  
  
  [<RequireQualifiedAccess>]
  [<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
  module Option =
  