[funds-cvs] r81 - trunk/funds/src/trees

abaine at common-lisp.net abaine at common-lisp.net
Wed Jul 11 03:27:29 UTC 2007


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))



More information about the Funds-cvs mailing list