aboutsummaryrefslogtreecommitdiff
path: root/module/hnh/util/tree.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-12 21:09:35 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-13 04:11:35 +0200
commit73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b (patch)
treee52324edc63a240e5c0b88081c325f789168a4c5 /module/hnh/util/tree.scm
parentDocument timespec and zic. (diff)
downloadcalp-73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b.tar.gz
calp-73a4bfc3d8e9bb5365e33a11a6ad3b8340d5195b.tar.xz
Remove custom let*.
While it was nice, the most important part was the multi-valued let from srfi-71 (which is implemented in srfi-71)). The minor pattern matching structures could often be replaced with car+cdr, or a propper match.
Diffstat (limited to 'module/hnh/util/tree.scm')
-rw-r--r--module/hnh/util/tree.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/hnh/util/tree.scm b/module/hnh/util/tree.scm
index 95328b5f..34e10365 100644
--- a/module/hnh/util/tree.scm
+++ b/module/hnh/util/tree.scm
@@ -1,5 +1,6 @@
(define-module (hnh util tree)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-71)
#:use-module (hnh util)
#:export (make-tree left-subtree
right-subtree
@@ -13,8 +14,8 @@
;; both it's children equal to @var{null}.
(define (make-tree pred? lst)
(unless (null? lst)
- (let* ((head tail (partition (lambda (el) (pred? (car lst) el))
- (cdr lst))))
+ (let ((head tail (partition (lambda (el) (pred? (car lst) el))
+ (cdr lst))))
(list (car lst)
(make-tree pred? head)
(make-tree pred? tail)))))