diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-06-21 20:02:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-06-21 20:02:40 -0700 |
commit | ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27 (patch) | |
tree | 4bddaf493f2d9a03e064ebe0ade3c5555bbcc1fa /share | |
parent | d0ffb09d01edbc28002520104865117894ef5fa9 (diff) | |
download | txr-ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27.tar.gz txr-ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27.tar.bz2 txr-ff9db4f3a6ee2a2bb5c821b73d59ffe792cbbc27.zip |
* lisplib.c (ifa_set_entries): Add conda.
* share/txr/stdlib/ifa.tl (conda): New macro.
* tests/012/ifa.tl: Adding test for conda.
* txr.1: Documenting conda.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/ifa.tl | 7 |
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)))) |