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 | a3028e441150ddac3db3ca9e1851ed547d0f72fc (patch) | |
tree | 21ca552d490ee18594391b5d3435abb0c2feedb7 /lib.h | |
parent | 99aea60f265cd70597d3c59142500956ed15fec6 (diff) | |
download | txr-a3028e441150ddac3db3ca9e1851ed547d0f72fc.tar.gz txr-a3028e441150ddac3db3ca9e1851ed547d0f72fc.tar.bz2 txr-a3028e441150ddac3db3ca9e1851ed547d0f72fc.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); |