anchor.diff:          ||> Map.fold (fun trie key value ->
               PatriciaMap.Insert (uint32 key, value, trie))
   
  +    //
  +    member this.Iterate (action : int -> 'T -> unit) : unit =
  +        match this with
  +        | Empty -> ()
  +        | Lf (k, x) ->
  +            action (int k) x
  +        | Br (_,_,_,_) as t ->
  +            let action = FSharpFunc<_,_,_>.Adapt action
  +
  +            // TODO : Run some experiments to determine if this is a good initial capacity,
  +            // or if there is a more suitable value.
  +            let stack = System.Collections.Generic.Stack (64)
  +
  +            // Add the initial tree to the stack.
  +            stack.Push t
  +
  +            /// Recursively processes the tree using the mutable stack.
  +            let rec traverse () =
  +                if stack.Count <> 0 then
  +                    match stack.Pop () with
  +                    | Empty ->
  +                        traverse ()
  +                    | Lf (k, x) ->
  +                        action.Invoke (int k, x)
  +                        traverse ()
  +                    
  +                    (* OPTIMIZATION :   When one or both children of this node are leaves, we handle
  +                                        them directly since it's a little faster. *)
  +                    | Br (_, _, Lf (k, x), Lf (j, y)) ->
  +                        action.Invoke (int k, x)
  +                        action.Invoke (int j, y)
  +                        traverse ()
  +                    
  +                    | Br (_, _, Lf (k, x), child) ->
  +                        // Only handle the case where the left child is a leaf -- otherwise
  +                        // the traversal order would be altered.
  +                        action.Invoke (int k, x)
  +                        stack.Push child
  +                        traverse ()
  +
  +                    | Br (_, _, left, right) ->
  +                        // Push both children onto the stack and recurse to process them.
  +                        stack.Push left
  +                        stack.Push right
  +                        traverse ()
  +
  +            // Traverse the tree, applying the action to the leaves.
  +            traverse ()
  +
  +    //
  +    member this.ToArray () =
  +        let elements = ResizeArray ()
  +
  +        this.Iterate <| fun key value ->
  +            elements.Add (key, value)
  +
  +        elements.ToArray ()
  +
   
   //
   [<Sealed>]
  +[<DebuggerTypeProxy(typedefof<IntMapDebuggerProxy<int>>)>]
  +[<DebuggerDisplay("Count = {Count}")>]
   type IntMap<'T> private (trie : PatriciaMap<'T>) =
       /// The empty IntMap.
       static member Empty
  
positive.code:         // Preconditions are checked by the member.
          IntMap.OfMap source
  
  
      // TODO
      // exists
      // filter
      // findKey
      // fold, foldBack
      // iter, iterBack
      // map
      // partition
      // pick
      // toArray
      // toList
      // toMap
      // toSeq
      // tryFindKey
      // tryPick
  
  
negative.code: //
  namespace ExtCore.Collections
  
  open System.Collections.Generic
  open System.Diagnostics
  open LanguagePrimitives
  open OptimizedClosures
  open ExtCore
  