diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2020-01-24 20:22:20 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2020-01-24 20:22:20 +0100 |
commit | 61a3301385ddb96e4c54ac7207fa1b71f7b0f381 (patch) | |
tree | 196f26b5068aa7c2bdbdf943c919dc1bdf3f9180 /module/util.scm | |
parent | Allow = in set->. (diff) | |
download | calp-61a3301385ddb96e4c54ac7207fa1b71f7b0f381.tar.gz calp-61a3301385ddb96e4c54ac7207fa1b71f7b0f381.tar.xz |
Add and=>>.
Diffstat (limited to '')
-rw-r--r-- | module/util.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/util.scm b/module/util.scm index 0751c7de..adac6b90 100644 --- a/module/util.scm +++ b/module/util.scm @@ -15,6 +15,7 @@ -> set set-> aif awhen tree-map let-lazy let-env case* define-many + and=>> ) #:replace (let* set! define-syntax when unless if)) @@ -405,6 +406,13 @@ [(_ obj (func args ...) rest ...) (set-> (set (func obj) args ...) rest ...)])) +(define-syntax and=>> + (syntax-rules () + [(_ value) value] + [(_ value proc rest ...) + (and=>> (and=> value proc) + rest ...)])) + (define-syntax let-env |