aboutsummaryrefslogtreecommitdiff
path: root/module/hnh/util.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-02-23 01:08:16 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-02-23 02:53:54 +0100
commit96d35184bae81888352645ad28efa279c3d5e322 (patch)
tree8c5f14233e27b7b689031384bf05e0e3c52fce76 /module/hnh/util.scm
parentAllow shorter byday when constructing recurrence rules. (diff)
downloadcalp-96d35184bae81888352645ad28efa279c3d5e322.tar.gz
calp-96d35184bae81888352645ad28efa279c3d5e322.tar.xz
Extend `for'-macro to allow improper list elements.
Diffstat (limited to 'module/hnh/util.scm')
-rw-r--r--module/hnh/util.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/hnh/util.scm b/module/hnh/util.scm
index ffac17bd..36b56c58 100644
--- a/module/hnh/util.scm
+++ b/module/hnh/util.scm
@@ -118,6 +118,9 @@
((for (<var> <vars> ...) in <collection> b1 body ...)
(map ((@ (ice-9 match) match-lambda) [(<var> <vars> ...) b1 body ...])
<collection>))
+ ((for (<var> <vars> ... . <tail>) in <collection> b1 body ...)
+ (map ((@ (ice-9 match) match-lambda) [(<var> <vars> ... . <tail>) b1 body ...])
+ <collection>))
((for <var> in <collection> b1 body ...)
(map (lambda (<var>) b1 body ...)
<collection>))))