code: func (t *BTree) Clear(addNodesToFreelist bool) {
  	if t.root != nil && addNodesToFreelist {
  		t.root.reset(t.cow)
  	}
  	t.root, t.length = nil, 0
  }
docs: // Clear removes all items from the btree.  If addNodesToFreelist is true,
  // t's nodes are added to its freelist as part of this call, until the freelist
  // is full.  Otherwise, the root node is simply dereferenced and the subtree
  // left to Go's normal GC processes.
  //
  // This can be much faster
  // than calling Delete on all elements, because that requires finding/removing
  // each element in the tree and updating the tree accordingly.  It also is
  // somewhat faster than creating a new tree to replace the old one, because
  // nodes from the old tree are reclaimed into the freelist for use by the new
  // one, instead of being lost to the garbage collector.
  //
  // This call takes:
  //   O(1): when addNodesToFreelist is false, this is a single operation.
  //   O(1): when the freelist is already full, it breaks out immediately
  //   O(freelist size):  when the freelist is empty and the nodes are all owned
  //       by this tree, nodes are added to the freelist until full.
  //   O(tree size):  when all nodes are owned by another tree, all nodes are
  //       iterated over looking for nodes to add to the freelist, and due to
  //       ownership, none are.