anchor.diff:              karr.Values_ <- values
   
               // clean up
  +            karr.Current_ <- current
               karr.Removed_ <- 0.0f
   
  +    /// Get the keyed array values.
  +    let getValues karr =
  +        karr.Values_
  +
  +    /// Get the threshold for compaction.
  +    let getThreshold karr =
  +        karr.Threshold_
  +    
  +    /// Get the current number of values (some of which may be empty).
  +    let getLength karr =
  +        karr.Current_
  +
  +    /// Add a keyed value, or update one if it already exists.
       let add key value karr =
           match karr.Indices_.TryGetValue key with
           | (false, _) ->
  
positive.code:             compact karr
          | (false, _) -> ()
  
      let make<'k, 'v when 'k : comparison> threshold size =
          { Keys_ = SortedDictionary<int, 'k> ()
            Indices_ = SortedDictionary<'k, int> ()
            Values_ = Array.zeroCreate size
            Current_ = 0
            Removed_ = 0.0f
            Threshold_ = threshold }
negative.code: open Prime
  open System.Collections.Generic
  
  [<RequireQualifiedAccess>]
  module KeyedArray =
  
      /// A garbage-collected keyed array.
      /// TODO: once this is well-tested, let's consider moving into Prime.
      type [<NoEquality; NoComparison>] KeyedArray<'k, 'v when 'k : comparison> =
          private
              { Keys_ : SortedDictionary<int, 'k> // sorted so that compacting does not change order
                Indices_ : Dictionary<'k, int>
                mutable Values_ : struct (bool * 'k * 'v) array
                mutable Current_ : int
                mutable Removed_ : single // single to elide unecessary conversions
                mutable Threshold_ : single }
  
          interface struct (bool * 'k * 'v) IEnumerable with
              member this.GetEnumerator () = this.Values_.GetEnumerator ()
              member this.GetEnumerator () = (this.Values_ :> _ IEnumerable).GetEnumerator ()
  
          /// The keyed array values.
          member this.Values =
              this.Values_
  
          /// The threshold for compaction.
          member this.Threshold =
              this.Threshold_
  
          /// The current number of values (some of which may be empty).
          member this.Length =
              this.Current_
  
          /// Index a keyed value.
          member this.Item key =
              &this.Values_.[this.Indices_.[key]]
  
      let private overflowing karr =
          karr.Current_ = karr.Values.Length
  
      let private underflowing karr =
          karr.Removed_ / single karr.Keys_.Count > karr.Threshold_
  
      let private expand karr =
  
          // check overflow
          if overflowing karr then
  