diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-12-18 20:50:07 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-12-18 20:50:07 -0800 |
commit | ddb0330c904fac025a6f50219937b204c4c880c7 (patch) | |
tree | dd1096793bf0fa30fdb683523e1a9a7edb1a7d70 /lisplib.c | |
parent | f0228c233a9b295c828dc4023f84b092eb8bee51 (diff) | |
download | txr-ddb0330c904fac025a6f50219937b204c4c880c7.tar.gz txr-ddb0330c904fac025a6f50219937b204c4c880c7.tar.bz2 txr-ddb0330c904fac025a6f50219937b204c4c880c7.zip |
New condlet macro; small change to iflet/whenlet.
* eval.c (me_iflet_whenlet): Allow the test form
to be an atomic expression instead of bindings.
This allows iflet to be used as the sole target
construct of condlet, while allowing condlet to
have a fallback clause with t. It also means that
an empty list of bindings is allowed (since it
is the atom nil).
* lisplib.c (ifa_set_entries): Add "condlet" to
the autoload names for the ifa module. That's
where we are adding condlet.
* share/txr/stdlib/ifa.tl (sys:if-to-cond): New
macro expander helper function, generalizing the writing
cond-like macros based on if-like operators.
(conda): Rewritten using sys:if-to-cond.
(condlet): New macro.
* txr.1: Documented change in iflet/whenlet.
Documented condlet.
Diffstat (limited to 'lisplib.c')
-rw-r--r-- | lisplib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -102,7 +102,7 @@ static val ver_instantiate(val set_fun) static val ifa_set_entries(val dlt, val fun) { - val name[] = { lit("ifa"), lit("conda"), nil }; + val name[] = { lit("ifa"), lit("conda"), lit("condlet"), nil }; set_dlt_entries(dlt, name, fun); return nil; } |