summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-10-05 06:20:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-10-05 06:20:08 -0700
commit7f7379793f4732b09350798c22d9ed22dd2f11ba (patch)
treede85d0c9cf8927395b3bb64b38272b261d6a8c4a /lib.h
parentc17054aa390ce42e867d9ce7b5fd821e0c666d45 (diff)
downloadtxr-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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 41b8608b..e48904a4 100644
--- a/lib.h
+++ b/lib.h
@@ -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);