summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorPaul A. Patience <paul@apatience.com>2022-01-22 03:19:07 -0500
committerKaz Kylheku <kaz@kylheku.com>2022-01-22 22:28:39 -0800
commit004e1208708fa7ed0538c391c42411e36ddac431 (patch)
tree499c8d691cd83f708590058ffdc0ba67514e8ecd /lib.c
parent912954cca7ed1d778a2ee7f416e0461845836c7c (diff)
downloadtxr-004e1208708fa7ed0538c391c42411e36ddac431.tar.gz
txr-004e1208708fa7ed0538c391c42411e36ddac431.tar.bz2
txr-004e1208708fa7ed0538c391c42411e36ddac431.zip
lib: new functions nand, nor, nandf and norf.
* eval.c (me_nand, me_nor, nor_fun, nand_fun): New functions. (eval_init): Register new intrinsics. * lib.c (nandv, norv): New functions. * lib.h (nandv, norv): Declared. * txr.1: Documented, along with trivial fixes to the descriptions of and, or, andf, orf and notf. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 91768c3a..b926f051 100644
--- a/lib.c
+++ b/lib.c
@@ -8862,6 +8862,16 @@ val notf(val fun)
return func_f0v(fun, do_not);
}
+val nandv(struct args *funlist)
+{
+ return notf(andv(funlist));
+}
+
+val norv(struct args *funlist)
+{
+ return notf(orv(funlist));
+}
+
static val do_iff(val env, struct args *args_in)
{
cons_bind (condfun, choices, env);