@node Binary Search Tree @section Binary Search Tree A simple ``read only'' binary search tree. @defun make-tree pred? lst Constructs a new tree. @var{pred?} should be a procedure taking the first element of @var{lst}, along with each element, and should return a boolean value indicating if the specific element should go in the left or right subtree. (left subtree is ``truthy'' values). This operation is done recursively. @end defun @defun tree-node tree Return the value of a tree node. @end defun @defun left-subtree tree Return all ``truthy'' children of tree node. @end defun @defun right-subtree tree Return all ``falsy children of tree node. @end defun @defun length-of-longest-branch tree Get the depth of a tree. @end defun @defun tree-map proc tree Apply proc onto the value of every node in tree, keeping the structure of the tree. @b{Note:} this can cause the tree to no longer be a binary search tree, but simply a ``formless'' binary tree. @end defun