From 62b26ba20bdf592e8649c9fc29744e46955858e8 Mon Sep 17 00:00:00 2001 From: erana Date: Sat, 21 Jan 2012 12:38:57 +0900 Subject: [PATCH] xanadu - -btree --- scsh/xanadu/b-tree.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scsh/xanadu/b-tree.scm b/scsh/xanadu/b-tree.scm index e63d68f..e92bfca 100644 --- a/scsh/xanadu/b-tree.scm +++ b/scsh/xanadu/b-tree.scm @@ -26,10 +26,12 @@ ;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -(define (make-b-tree-node) +(define (make-b-tree-node left right) (let ((numitems 0) (numnodes 0) - (root 'foo)) + (root 'foo) + (left left) + (right right)) (define (get-root) root) @@ -48,6 +50,10 @@ get-numitems) ((eq? msg 'get-numnodes) get-numnodes) + ((eq? msg 'get-left) + get-left) + ((eq? msg 'get-right) + get-right) (else (display "b-tree-node : message not understood"))))) dispatch))