anchor.diff:              else
                   let root, r' = AvlTree.DeleteMin r
                   AvlTree.Join (comparer, l, r', root)
  +
  +    /// Internal. Only for use with [<StructuredFormatDisplay>].
  +    member private this.DisplayFormatted
  +        with get () = AvlTree.ToCodeString this
  +
  +    /// Prints a tree as F# code which, when executed, will re-create the tree.
  +    static member internal ToCodeString (tree : AvlTree<'T>) : string =
  +        /// Holds the printed code.
  +        let sb = System.Text.StringBuilder ()
  +
  +        // Create an IndentedTextWriter which will write to the StringBuilder.
  +        using (new IndentedTextWriter (new System.IO.StringWriter (sb), "    ")) <| fun indentedWriter ->
  +            // Traverse the tree and write the code into the StringBuilder.
  +            AvlTree.ToCodeStringImpl (tree, indentedWriter)
  +
  +            // Flush the writer's buffer to make sure everything has been written into
  +            // the StringBuilder, then return the code string.
  +            indentedWriter.Flush ()
  +            sb.ToString ()
  +
  +    /// Prints a tree as F# code which, when executed, will re-create the tree.
  +    static member private ToCodeStringImpl (tree : AvlTree<'T>, indentedWriter : IndentedTextWriter) : unit =
  +        match tree with
  +        | Empty ->
  +            Printf.fprintf indentedWriter "Empty"
  +        
  +        | Node (l, r, n, h) ->
  +            // Write the constructor for this Node.
  +            Printf.fprintf indentedWriter "Node ("
  +
  +            // Increase the indentation level _before_ writing the constructor arguments.
  +            // This ensures the new indentation level will be used when printing the first argument's value.
  +            let originalIndent = indentedWriter.Indent
  +            indentedWriter.Indent <- originalIndent + 1
  +            indentedWriter.WriteLine ()
  +
  +            // Print the left subtree.
  +            AvlTree.ToCodeStringImpl (l, indentedWriter)
  +            indentedWriter.WriteLine ","
  +
  +            // Print the right subtree.
  +            AvlTree.ToCodeStringImpl (r, indentedWriter)
  +            indentedWriter.WriteLine ","
  +
  +            // Print the value carried within this Node.
  +            Printf.fprintf indentedWriter "%A" n
  +            indentedWriter.WriteLine ","
  +
  +            // Print the height of this Node.
  +            Printf.fprintf indentedWriter "%uu" h
  +
  +            // Decrease the indentation level _before_ writing the constructor arguments.
  +            // This ensures the indentation level will be back to it's original value when this function returns.
  +            indentedWriter.Indent <- originalIndent
  +
  +            // Close the constructor.
  +            // Don't write a newline here -- it'll be written when this function returns.
  +            indentedWriter.Write ")"
   
   //
   and [<Sealed>]
  
positive.code:         // Preconditions
          //assert (AvlTree.AvlInvariant l)
          //assert (AvlTree.AvlInvariant r)
          //assert (AvlTree.Height r <= AvlTree.Height l + balanceTolerance)
  
          if AvlTree.Height r = AvlTree.Height l + balanceTolerance then
              match r with
  
negative.code:         // Preconditions
          //assert (AvlTree.AvlInvariant l)
          //assert (AvlTree.AvlInvariant r)
          // TODO : Assert all values in 'l' are less than all values in 'r'.
  
          match l, r with
          | Empty, Empty ->
  