summaryrefslogtreecommitdiffstats
path: root/wttree.scm
diff options
context:
space:
mode:
authorJames LewisMoss <dres@debian.org>1999-12-06 19:32:57 -0500
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:28 -0800
commitc394920caedf3dac1981bb6b10eeb47fd6e4bb21 (patch)
treef21194653a3554f747dde3df908df993c48db5a0 /wttree.scm
parent926b1b647ac830660933a5e63eb52d4a2552e264 (diff)
parentbd9733926076885e3417b74de76e4c9c7bc56254 (diff)
downloadslib-c394920caedf3dac1981bb6b10eeb47fd6e4bb21.tar.gz
slib-c394920caedf3dac1981bb6b10eeb47fd6e4bb21.zip
Import Debian changes 2c7-1debian/2c7-1
slib (2c7-1) unstable; urgency=low * New upstream. * Add slibconfig back in. slib (2c6-2) unstable; urgency=low * Remove the slib$(VERSION).info file. Cut the diff back down to size. slib (2c6-1) unstable; urgency=low * New upstream. * Move docs to /usr/share. Up standards version. add /usr/doc symlink. Move info files. Remove undocumented link. slib (2c5-6) unstable; urgency=low * Lowercase two vars in yasyn.scm (Fixes bug #37222) slib (2c5-5) unstable; urgency=low * Fix it so string-index isn't defined (now there is a strsrch:string-index) (Fixes #38812) slib (2c5-4) unstable; urgency=low * Don't run slibconfig in postinst. (Fixes bug #38253, #37733, #37715, #37746, #37809, #37917, #38123, #38462) slib (2c5-3) unstable; urgency=low * Run slibconfig in postinst. It was commented out there, but I don't see any old bug reports on why it was commented out, so let's try again. :) (Fixes bug #37221) slib (2c5-2) unstable; urgency=low * Link mklibcat.scm to mklibcat. Fixes a problem with using slib with guile. slib (2c5-1) unstable; urgency=low * New upstream. slib (2c3-4) unstable; urgency=low * New maintainer.
Diffstat (limited to 'wttree.scm')
-rw-r--r--wttree.scm32
1 files changed, 16 insertions, 16 deletions
diff --git a/wttree.scm b/wttree.scm
index 3cf749a..515563f 100644
--- a/wttree.scm
+++ b/wttree.scm
@@ -1,7 +1,7 @@
;; "wttree.scm" Weight balanced trees -*-Scheme-*-
;; Copyright (c) 1993-1994 Stephen Adams
;;
-;; $Id: wttree.scm,v 1.2 1998/02/09 23:13:10 jaffer Exp $
+;; $Id: wttree.scm,v 1.3 1999/10/11 03:36:29 jaffer Exp $
;;
;; References:
;;
@@ -44,7 +44,7 @@
;;
;; Weight Balanced Binary Trees
;;
-;;
+;;
;;
;; This file has been modified from the MIT-Scheme library version to
;; make it more standard. The main changes are
@@ -169,18 +169,18 @@
(define tag:tree-type (string->symbol "#[(runtime wttree)tree-type]"))
- (define (%make-tree-type key<? alist->tree
- add insert!
- delete delete!
- member? lookup
- split-lt split-gt
- union intersection
- difference subset?
+ (define (%make-tree-type key<? alist->tree
+ add insert!
+ delete delete!
+ member? lookup
+ split-lt split-gt
+ union intersection
+ difference subset?
rank )
(vector tag:tree-type
- key<? alist->tree add insert!
- delete delete! member? lookup
- split-lt split-gt union intersection
+ key<? alist->tree add insert!
+ delete delete! member? lookup
+ split-lt split-gt union intersection
difference subset? rank ))
(define (tree-type? tt)
@@ -401,11 +401,11 @@
(define (node/rank k node rank)
(cond ((empty? node) #f)
((key<? k (node/k node)) (node/rank k (node/l node) rank))
- ((key>? k (node/k node))
+ ((key>? k (node/k node))
(node/rank k (node/r node)
(fix:+ 1 (fix:+ rank (node/size (node/l node))))))
(else (fix:+ rank (node/size (node/l node))))))
-
+
(define (node/add node k v)
(if (empty? node)
(node/singleton k v)
@@ -463,7 +463,7 @@
((key<? (node/k node) x)
(node/split-gt (node/r node) x))
((key<? x (node/k node))
- (node/concat3 (node/k node) (node/v node)
+ (node/concat3 (node/k node) (node/v node)
(node/split-gt (node/l node) x) (node/r node)))
(else (node/r node))))
@@ -566,7 +566,7 @@
(cond ((null? alist) node)
((pair? alist) (loop (cdr alist)
(node/add node (caar alist) (cdar alist))))
- (else
+ (else
(error:wrong-type-argument alist "alist" 'alist->tree))))
(%make-wt-tree my-type (loop alist empty)))