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

abaine at common-lisp.net abaine at common-lisp.net
Thu Aug 2 15:35:59 UTC 2007


Author: abaine
Date: Thu Aug  2 11:35:58 2007
New Revision: 103

Modified:
   trunk/funds/src/trees/avl.lisp
   trunk/funds/src/trees/tree-insert.lisp
Log:
Added default left and right keywords in stitch-avl-nodes.

Modified: trunk/funds/src/trees/avl.lisp
==============================================================================
--- trunk/funds/src/trees/avl.lisp	(original)
+++ trunk/funds/src/trees/avl.lisp	Thu Aug  2 11:35:58 2007
@@ -59,7 +59,7 @@
 		      (other-side side) new-outside)))
 
 (defun stitch-avl-nodes (&key root (key (bt-key root)) (value (bt-value root))
-		     left right)
+			 (left (make-avl-leaf)) (right make-avl-leaf))
   (make-instance 'avl-tree
 		 :key key :value value
 		 :left left :right right

Modified: trunk/funds/src/trees/tree-insert.lisp
==============================================================================
--- trunk/funds/src/trees/tree-insert.lisp	(original)
+++ trunk/funds/src/trees/tree-insert.lisp	Thu Aug  2 11:35:58 2007
@@ -33,8 +33,8 @@
 
 (defmethod tree-insert ((tree avl-leaf) key value &key test order)
   (declare (ignore test order))
-  (make-avl-tree :key key
-		 :value value))
+  (stitch-avl-tree :key key
+		   :value value))
 
 (defmethod tree-insert ((tree binary-tree) key value 
 			&key (test #'eql) (order #'<))



More information about the Funds-cvs mailing list