diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-02-05 17:42:59 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-02-05 17:42:59 -0800 |
commit | 87ef0e20b4e9d8f82d061ddc6993d04a2f6eda9d (patch) | |
tree | 2886dd9d1afa7d16de09c882ddd654b73617a250 /lib.c | |
parent | 04a75123fc2f6135850a811bf7477ed97fdcdc83 (diff) | |
download | txr-87ef0e20b4e9d8f82d061ddc6993d04a2f6eda9d.tar.gz txr-87ef0e20b4e9d8f82d061ddc6993d04a2f6eda9d.tar.bz2 txr-87ef0e20b4e9d8f82d061ddc6993d04a2f6eda9d.zip |
* lib.c (generic_funcall): If a cons cell is passed as
one argument to a sequence being used as a function, split it into two
arguments. This is consistent with the DWIM operator behavior.
* txr.1: Document callable objects.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3248,6 +3248,8 @@ val generic_funcall(val fun, val arg[], int nargs) case 0: uw_throw(error_s, lit("call: missing required arguments")); case 1: + if (consp(arg[0])) + return sub(fun, car(arg[0]), cdr(arg[0])); return ref(fun, arg[0]); case 2: return sub(fun, arg[0], arg[1]); |