Author: abaine Date: Tue Jul 10 23:27:29 2007 New Revision: 81
Modified: trunk/funds/src/trees/bt.lisp Log: Factored out side-to-insert function.
Modified: trunk/funds/src/trees/bt.lisp ============================================================================== --- trunk/funds/src/trees/bt.lisp (original) +++ trunk/funds/src/trees/bt.lisp Tue Jul 10 23:27:29 2007 @@ -39,3 +39,8 @@ :value (bt-value root) :left left :right right)) + +(defun side-to-insert (tree key &key order) + (if (funcall order key (bt-key tree)) + :left + :right))