diff options
author | Paul A. Patience <paul@apatience.com> | 2022-01-22 03:19:07 -0500 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-22 22:28:39 -0800 |
commit | 004e1208708fa7ed0538c391c42411e36ddac431 (patch) | |
tree | 499c8d691cd83f708590058ffdc0ba67514e8ecd /lib.c | |
parent | 912954cca7ed1d778a2ee7f416e0461845836c7c (diff) | |
download | txr-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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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); |