summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-11-29 23:15:48 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-11-29 23:15:48 -0800
commit65189fb5a549a4149db9a6b59bd89d2d8009b89b (patch)
treec6d0e395b6466c01d1739f2e034cd9ff2ab77f5a /eval.c
parent5cdd2fd5ff14c113b867df969779c75fca79932e (diff)
downloadtxr-65189fb5a549a4149db9a6b59bd89d2d8009b89b.tar.gz
txr-65189fb5a549a4149db9a6b59bd89d2d8009b89b.tar.bz2
txr-65189fb5a549a4149db9a6b59bd89d2d8009b89b.zip
* eval.c (eval_init): New functions countqual, countql, countq
and count_if registered as intrinsics. * lib.c (countqual, countql, countq, count_if): New functions. * lib.h (countqual, countql, countq, count_if): Declared. * txr.1: New functions documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index c6073f0a..f40e6b89 100644
--- a/eval.c
+++ b/eval.c
@@ -2249,6 +2249,10 @@ void eval_init(void)
reg_fun(intern(lit("remove-if*"), user_package), func_n3o(remove_if_lazy, 2));
reg_fun(intern(lit("keep-if*"), user_package), func_n3o(keep_if_lazy, 2));
reg_fun(intern(lit("tree-find"), user_package), func_n3o(tree_find, 2));
+ reg_fun(intern(lit("countqual"), user_package), func_n2(countqual));
+ reg_fun(intern(lit("countql"), user_package), func_n2(countql));
+ reg_fun(intern(lit("countq"), user_package), func_n2(countq));
+ reg_fun(intern(lit("count-if"), user_package), func_n3o(count_if, 2));
reg_fun(intern(lit("some"), user_package), func_n3o(some_satisfy, 2));
reg_fun(intern(lit("all"), user_package), func_n3o(all_satisfy, 2));
reg_fun(intern(lit("none"), user_package), func_n3o(none_satisfy, 2));