summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/ifa.tl7
1 files changed, 7 insertions, 0 deletions
diff --git a/share/txr/stdlib/ifa.tl b/share/txr/stdlib/ifa.tl
index 180e5231..bffe8246 100644
--- a/share/txr/stdlib/ifa.tl
+++ b/share/txr/stdlib/ifa.tl
@@ -50,3 +50,10 @@
(it-temp [temps pos-candidate]))
^(let* (,*(zip temps args) (it ,it-temp))
(if (,sym ,*temps) ,then ,else))))))))
+
+(defmacro conda (. pairs)
+ (tree-case pairs
+ (((test . forms) . rest) ^(ifa ,test (progn ,*forms)
+ (conda ,*rest)))
+ (() ())
+ (else (throwf 'eval-error "conda: bad syntax: ~s" pairs))))