diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-12-09 06:49:32 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-12-09 06:49:32 -0800 |
commit | 602555a3178f8fa46ef68d162509717dc82ed1c0 (patch) | |
tree | b39bbe6f848dce7421fb5282a1dd6c05c8d44f57 /txr.1 | |
parent | 632acffb331db8674aded94425ed87b44e501058 (diff) | |
download | txr-602555a3178f8fa46ef68d162509717dc82ed1c0.tar.gz txr-602555a3178f8fa46ef68d162509717dc82ed1c0.tar.bz2 txr-602555a3178f8fa46ef68d162509717dc82ed1c0.zip |
Bugfix: ifa must allow dwim expressions.
* share/txr/stdlib/ifa.tl (ifa): Accept dwim expressions
as the condition. Moreover, treat [f x] as a one-argument
call, even though it is the two-argument form (dwim f x).
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -12271,12 +12271,24 @@ expression: .IP 1. The .meta cond -expression must be either an atom, or a function call form: -a compound expression with a symbol in the leftmost position -which resolves to a function. Otherwise the +expression must be either an atom, a function call form, +or a +.code dwim +form. Otherwise the .code ifa expression is ill-formed, and throws an exception at -macro-expansion time. +macro-expansion time. For the purposes of these rules, +a +.code dwim +form is considered as a function call expression, whose first +argument is the second element of the form. That is to say, +.code [f x] +which is equivalent to +.code (dwim f x) +is treated similarly to +.code (f x) +as a one-argument call. + .IP 2. If the .meta cond @@ -12301,7 +12313,9 @@ operator. .IP 4. If .meta cond -is a function call with exactly one argument, then the +is a function call or +.code dwim +expression with exactly one argument, then the .code it variable is bound to the argument expression, except when the function being called is |