summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-26 06:56:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-26 06:56:10 -0700
commit3dbaecd359c584e1bcf650cdf53fb35253599e15 (patch)
treecdabf8284e140a72cd19e447bfab7ec7bde94f85 /lib.h
parent5b0ee1a4dcdad30c4554a9aaa17600ae3e8073d7 (diff)
downloadtxr-3dbaecd359c584e1bcf650cdf53fb35253599e15.tar.gz
txr-3dbaecd359c584e1bcf650cdf53fb35253599e15.tar.bz2
txr-3dbaecd359c584e1bcf650cdf53fb35253599e15.zip
* eval.c (mapcarv): Use mapcar_listout, so list_of_lists can be
a non-list sequence. (eval_init): Register transpose and zip as intrinsics. * lib.c (curry_12_1_v): New static function. (transpose, mapcar_listout): New functions. (mapcar): Redefined in terms of mapcar_listout. * lib.h (transpose, mapcar_listout): Declared. * txr.1: Documented transpose and zip.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 3e792bd7..0ea13787 100644
--- a/lib.h
+++ b/lib.h
@@ -673,6 +673,7 @@ val funcall3(val fun, val arg1, val arg2, val arg3);
val funcall4(val fun, val arg1, val arg2, val arg3, val arg4);
val reduce_left(val fun, val list, val init, val key);
val reduce_right(val fun, val list, val init, val key);
+val transpose(val lists);
/* The notation curry_12_2 means take some function f(arg1, arg2) and
fix a value for argument 1 to create a g(arg2).
Other variations follow by analogy. */
@@ -733,6 +734,7 @@ val alist_nremove(val list, val keys);
val alist_nremove1(val list, val key);
val copy_cons(val cons);
val copy_alist(val list);
+val mapcar_listout(val fun, val list);
val mapcar(val fun, val list);
val mapcon(val fun, val list);
val mappend(val fun, val list);