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 /txr.1 | |
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 'txr.1')
-rw-r--r-- | txr.1 | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -14447,6 +14447,33 @@ traverse the last argument.) (append '(a . b) 3 '(1 2 3)) -> **error** .cble +.coNP Functions @ revappend and @ nreconc +.synb +.mets (revappend < list1 << list2 ) +.mets (nreconc < list1 << list2 ) +.syne +.desc +The +.code revappend +function returns a list consisting of +.code list2 +appended to a reversed copy of +.metn list1 . +The returned object shares structure +with +.metn list2 , +which is unmodified. + +The +.code nreconc +function behaves similarly, except +that the the returned object may share +structure with not only +.meta list2 +but also +.metn list1 , +which is modified. + .coNP Function @ list .synb .mets (list << value *) |