aboutsummaryrefslogtreecommitdiff
path: root/module/util.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-01-23 14:00:24 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-01-23 14:00:24 +0100
commit5c368a8e62d722688c4a81d5af16af8bf32eb560 (patch)
treec61f6f466aadeb856f73b0345007a98d6818d6f3 /module/util.scm
parentAdd case* and define-many. (diff)
downloadcalp-5c368a8e62d722688c4a81d5af16af8bf32eb560.tar.gz
calp-5c368a8e62d722688c4a81d5af16af8bf32eb560.tar.xz
Allow = in set->.
Diffstat (limited to 'module/util.scm')
-rw-r--r--module/util.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/util.scm b/module/util.scm
index 4cc591ab..0751c7de 100644
--- a/module/util.scm
+++ b/module/util.scm
@@ -398,8 +398,10 @@
obj ((acc) (op (acc obj) rest ...)))]))
(define-syntax set->
- (syntax-rules ()
+ (syntax-rules (=)
[(_ obj) obj]
+ [(_ obj (func = (op args ...)) rest ...)
+ (set-> (set (func obj) (op (func obj) args ...)) rest ...)]
[(_ obj (func args ...) rest ...)
(set-> (set (func obj) args ...) rest ...)]))