anchor.diff:  
   /// A map data structure that works best when a continuous range of keys is assigned the same value.
   /// It can also double as a set, when the value type is a unit.
  -type RangeMap<'key,'a when 'key :> IComparable<'key>> = RangeMap of RangeMapElement<'key,'a> ImmutableArray
  +type RangeMap<'key,'a when 'key :> IComparable<'key>> = private RangeMap of RangeMapElement<'key,'a> ImmutableArray
   with
       // An immutable array of the elements of a `RangeMap`.
       member x.Elements = match x with | RangeMap x -> x
  
positive.code:     /// Creates a `RangeMap` from a sequence of key-value pairs.
      /// The keys can be of any type that can has the notion of "one" and equality checking.
      /// The keys have to be sorted beforehand, or the resulting `RangeMap` will be broken.
      let inline ofSeq xs =
          match Seq.tryLast xs with
          | Some(KeyValue(k, v)) ->
              Seq.foldBack (fun (KeyValue(k', v')) (kFrom, kTo, v, xs) ->
                  if v = v' && kFrom = k' + LanguagePrimitives.GenericOne then
                      (k', kTo, v, xs)
                  elif kFrom <> k' then
                      (k', k', v', {KeyFrom = kFrom; KeyTo = kTo; Value = v} :: xs)
  
negative.code:             |> ImmutableArray.CreateRange
              |> RangeMap
          | None -> empty()
  
      let inline ofSeq xs = ofSeqEx ((+) LanguagePrimitives.GenericOne) xs
  