--  Binary search trees of integers, owned through access values and freed explicitly.
package Trees is
   type Tree_Node;
   type Tree is access Tree_Node;
   type Tree_Node is record
      Key   : Integer := 0;
      Left  : Tree;
      Right : Tree;
   end record;

   procedure Insert (T : in out Tree; K : Integer)
     with Post => T /= null;

   procedure Contains (T : Tree; K : Integer; Found : out Boolean);

   procedure Print_In_Order (T : Tree);

   procedure Clear (T : in out Tree)
     with Post => T = null;
end Trees;
