diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-06-26 06:56:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-06-26 06:56:10 -0700 |
commit | 3dbaecd359c584e1bcf650cdf53fb35253599e15 (patch) | |
tree | cdabf8284e140a72cd19e447bfab7ec7bde94f85 /lib.h | |
parent | 5b0ee1a4dcdad30c4554a9aaa17600ae3e8073d7 (diff) | |
download | txr-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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |