diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-11-11 06:40:24 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-11-11 06:40:24 -0800 |
commit | 008fccfa96b61189c0056ff5e3b708be1aa02f45 (patch) | |
tree | 16f9cbb9921d6ef18cea8705e2f9a61ef342325f /eval.c | |
parent | 82020af157ad104be3a62b57053d2420d17785f9 (diff) | |
download | txr-008fccfa96b61189c0056ff5e3b708be1aa02f45.tar.gz txr-008fccfa96b61189c0056ff5e3b708be1aa02f45.tar.bz2 txr-008fccfa96b61189c0056ff5e3b708be1aa02f45.zip |
Adding revappend and nreconc.
* eval.c (eval_init): Register revappend and nreconc
intrinsics.
* lib.c (list_collect_nreconc): New function.
(revlist): New static function.
(list_collect_revappend): New function.
(revappend, nreconc): New functions.
* lib.h (revappend, nreconc): Declared.
(list_collect_nreconc, list_collect_revappend): Declared.
* txr.1: Documented revappend and nreconc.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4420,6 +4420,8 @@ void eval_init(void) reg_fun(append_s, func_n0v(appendv)); reg_fun(intern(lit("append*"), user_package), func_n0v(lazy_appendv)); reg_fun(intern(lit("nconc"), user_package), func_n0v(nconcv)); + reg_fun(intern(lit("revappend"), user_package), func_n2(revappend)); + reg_fun(intern(lit("nreconc"), user_package), func_n2(nreconc)); reg_fun(list_s, list_f); reg_fun(intern(lit("list*"), user_package), func_n0v(list_star_intrinsic)); reg_fun(identity_s, identity_f); |