From 89f138dfb7b37a4ac25d1046fb66583e6a6172c8 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 24 Jan 2011 14:43:42 +0000 Subject: [PATCH] Two minor cosmetic changes to runtime/wttree.scm. --- src/runtime/wttree.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/wttree.scm b/src/runtime/wttree.scm index 07dbec885..7626faac7 100644 --- a/src/runtime/wttree.scm +++ b/src/runtime/wttree.scm @@ -127,7 +127,7 @@ parameters assisted by Coq. This is what we use here now. ;;; (define (n-join k v l r) - (make-node k v l r (+ 1 (+ (node/size l) (node/size r))))) + (make-node k v l r (+ 1 (node/size l) (node/size r)))) (declare (integrate-operator n-join)) (define (single-l a.k a.v x r) @@ -654,7 +654,7 @@ parameters assisted by Coq. This is what we use here now. (define (balanced? node) (or (empty? node) (let ((l (node/l node)) (r (node/r node))) - (let ((lw (+ (node/size l) 1)) (rw (+ (node/size r) 1))) + (let ((lw (node/weight l)) (rw (node/weight r))) (and (<= lw (* wt-tree-delta rw)) (<= rw (* wt-tree-delta lw)) (balanced? l) -- 2.25.1