summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-11 16:42:33 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-11 16:42:33 -0800
commit15dda4428072bb741d6bf42fa4906b217fc2aeb1 (patch)
tree56e8975170bac4dbf3c5cfa526b59667066732eb /eval.c
parent8910536efaa12182a4ae0158783a1bb1426cdf04 (diff)
downloadtxr-15dda4428072bb741d6bf42fa4906b217fc2aeb1.tar.gz
txr-15dda4428072bb741d6bf42fa4906b217fc2aeb1.tar.bz2
txr-15dda4428072bb741d6bf42fa4906b217fc2aeb1.zip
* eval.c (eval_init): Turn a require argument into an optional
one for the functions some, all and none. * lib.c (some_satisfy, all_satisfy, none_satisfy): Add defaulting behavior for pred parameter. * txr.1: Document that the predicate function is optional in calls to some, all and none.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index eff15bb1..82aa8ea0 100644
--- a/eval.c
+++ b/eval.c
@@ -2412,9 +2412,9 @@ void eval_init(void)
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));
+ reg_fun(intern(lit("some"), user_package), func_n3o(some_satisfy, 1));
+ reg_fun(intern(lit("all"), user_package), func_n3o(all_satisfy, 1));
+ reg_fun(intern(lit("none"), user_package), func_n3o(none_satisfy, 1));
reg_fun(intern(lit("eq"), user_package), eq_f);
reg_fun(intern(lit("eql"), user_package), eql_f);
reg_fun(intern(lit("equal"), user_package), equal_f);