summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-03-16 21:43:51 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-03-16 21:43:51 -0700
commit8bb336298d0bf4e165fa03f7f2a219ddad6e466f (patch)
tree2b102c6c3fd927a4589b4b1cf75099c9cdc97384 /lib.h
parent5e765926b07b544f9dd4860af5f0e669432434ea (diff)
downloadtxr-8bb336298d0bf4e165fa03f7f2a219ddad6e466f.tar.gz
txr-8bb336298d0bf4e165fa03f7f2a219ddad6e466f.tar.bz2
txr-8bb336298d0bf4e165fa03f7f2a219ddad6e466f.zip
* eval.c (eval_init): New intrinsic functions
chain, andf, orf, iff. * lib.c (chainv): New function. (do_and, do_or): Generalized to handle functions of any arguments via apply. (andf, orf): Turn do_and and do_or into variadic function instead of a monadic function. (do_iff): New static function. (andv, orv, iff): New functions. * lib.h (chainv, andv, orv, iff): New functions declared. * txr.1: Doc stubs created. * txr.vim: Updated.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index a143a128..dae6c755 100644
--- a/lib.h
+++ b/lib.h
@@ -517,8 +517,12 @@ val curry_123_1(val fun3, val arg2, val arg3);
val curry_123_23(val fun3, val arg1);
val curry_1234_34(val fun3, val arg1, val arg2);
val chain(val first_fun, ...);
+val chainv(val funlist);
val andf(val first_fun, ...);
+val andv(val funlist);
val orf(val first_fun, ...);
+val orv(val funlist);
+val iff(val condfun, val thenfun, val elsefun);
val swap_12_21(val fun);
val vector(val length);
val vectorp(val vec);