diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-25 06:39:58 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-25 06:39:58 -0700 |
commit | dcd3ef3f78ee3f17d7c706ccaa1ff74c5dc7f104 (patch) | |
tree | 21ca552d490ee18594391b5d3435abb0c2feedb7 /lib.h | |
parent | 95abf5aa1cb792bdcb472399d1ef9dfc9b9088e0 (diff) | |
download | txr-dcd3ef3f78ee3f17d7c706ccaa1ff74c5dc7f104.tar.gz txr-dcd3ef3f78ee3f17d7c706ccaa1ff74c5dc7f104.tar.bz2 txr-dcd3ef3f78ee3f17d7c706ccaa1ff74c5dc7f104.zip |
New accessors nthlast and butlastn.
* eval.c (eval_init): register nthlast and butlastn
intrinsicis.
* lib.c (nthlast, butlastn): New function.
* lib.h (nthlast, butlastn): Declared.
* share/txr/stdlib/place.tl (defplace nthlast,
defplace butlastn): New places.
* txr.1: Documented nthlast and butlastn.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -508,7 +508,9 @@ loc tail(val cons); loc term(loc head); loc lastcons(val list); val last(val list); +val nthlast(val pos, val list); val nthcdr(val pos, val list); +val butlastn(val n, val list); loc ltail(loc cons); val pop(val *plist); val upop(val *plist, val *pundo); |