diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-05 06:20:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-05 06:20:08 -0700 |
commit | 7f7379793f4732b09350798c22d9ed22dd2f11ba (patch) | |
tree | de85d0c9cf8927395b3bb64b38272b261d6a8c4a /lib.h | |
parent | c17054aa390ce42e867d9ce7b5fd821e0c666d45 (diff) | |
download | txr-7f7379793f4732b09350798c22d9ed22dd2f11ba.tar.gz txr-7f7379793f4732b09350798c22d9ed22dd2f11ba.tar.bz2 txr-7f7379793f4732b09350798c22d9ed22dd2f11ba.zip |
New functions take, drop, {take,drop}-{while,until}.
* lib.c (take_list_fun, take_while_list_fun,
take_until_list_fun): New static functions.
(take, take_while, take_until, drop, drop_while,
drop_until): New functions.
* eval.c (eval_init): Register intrinsics take,
take-while, take-until, drop, drop-while, drop-until.
* txr.1: Documented.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -872,6 +872,12 @@ val pos(val list, val key, val testfun, val keyfun); val pos_if(val pred, val list, val key); val pos_max(val seq, val testfun, val keyfun); val pos_min(val seq, val testfun, val keyfun); +val take(val count, val seq); +val take_while(val pred, val seq, val keyfun); +val take_until(val pred, val seq, val keyfun); +val drop(val count, val seq); +val drop_while(val pred, val seq, val keyfun); +val drop_until(val pred, val seq, val keyfun); val in(val seq, val key, val testfun, val keyfun); val set_diff(val list1, val list2, val testfun, val keyfun); val copy(val seq); |