FIND now returns the NODE-KEY rather than the passed ITEM-KEY.
[trees.git] / binary-trees.lisp
index bccc1b6..46351f7 100644 (file)
@@ -57,7 +57,7 @@
       (let ((node-key (funcall key (datum node))))
         (cond
           ((funcall test node-key item-key)
-           (return-from find-insertion-point (values node direction-stack item-key)))
+           (return-from find-insertion-point (values node direction-stack node-key)))
           ((funcall pred item-key node-key)
            (push (cons node 'left) direction-stack)
            (setf node (left node)))