From 61a3301385ddb96e4c54ac7207fa1b71f7b0f381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 24 Jan 2020 20:22:20 +0100 Subject: Add and=>>. --- module/util.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'module/util.scm') 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 -- cgit v1.2.3