diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-15 06:48:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-15 06:48:11 -0700 |
commit | 5a09b244c77dbf498a4bdf7a9381d2741ce87055 (patch) | |
tree | 19c02de1d17eb709ec77b8458c7c679fc705b562 /eval.c | |
parent | a3c8effa1337c16e9c7832bf1fb4e66f72e5c3c8 (diff) | |
download | txr-5a09b244c77dbf498a4bdf7a9381d2741ce87055.tar.gz txr-5a09b244c77dbf498a4bdf7a9381d2741ce87055.tar.bz2 txr-5a09b244c77dbf498a4bdf7a9381d2741ce87055.zip |
key function argument on remq, remql and remqual.
* eval.c (weave_while): Pass third arg to remq as nil.
(eval_init): Update registrations of remq, remql and
remqual.
* lib.c (remq, remql, remqual): Implement key function
argument.
* lib.h (remq, remql, remqual): Declarations updated.
* sysif.c (at_exit_call): Pass third arg to remq as nil.
* debug.c (debug): Pass third argument to remqual as nil.
* txr.1: Documentation updated.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4414,7 +4414,7 @@ static val weave_while(val env) if (!tuples) return nil; - tuple = remq(uniq, car(tuples)); + tuple = remq(uniq, car(tuples), nil); if (!tuple) return nil; @@ -5021,9 +5021,9 @@ void eval_init(void) reg_fun(intern(lit("rmember"), user_package), func_n4o(rmember, 2)); reg_fun(intern(lit("member-if"), user_package), func_n3o(member_if, 2)); reg_fun(intern(lit("rmember-if"), user_package), func_n3o(rmember_if, 2)); - reg_fun(intern(lit("remq"), user_package), func_n2(remq)); - reg_fun(intern(lit("remql"), user_package), func_n2(remql)); - reg_fun(intern(lit("remqual"), user_package), func_n2(remqual)); + reg_fun(intern(lit("remq"), user_package), func_n3o(remq, 2)); + reg_fun(intern(lit("remql"), user_package), func_n3o(remql, 2)); + reg_fun(intern(lit("remqual"), user_package), func_n3o(remqual, 2)); reg_fun(intern(lit("remove-if"), user_package), func_n3o(remove_if, 2)); reg_fun(intern(lit("keepq"), user_package), func_n3o(keepq, 2)); reg_fun(intern(lit("keepql"), user_package), func_n3o(keepql, 2)); |