From: Nathan Froyd Date: Mon, 21 May 2012 14:47:21 +0000 (-0700) Subject: Merge pull request #2 from rpav/key-return-fix X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=443f717d325cfa5188be43a6e9cabfc2d0a78639;hp=981c7f5adec954a094eb52f48fa7fddd7f4168da;p=trees.git Merge pull request #2 from rpav/key-return-fix FIND now returns the NODE-KEY rather than the passed ITEM-KEY. --- diff --git a/binary-trees.lisp b/binary-trees.lisp index bccc1b6..46351f7 100644 --- a/binary-trees.lisp +++ b/binary-trees.lisp @@ -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)))