summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-11-20 19:59:50 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-11-20 19:59:50 -0800
commitd4b9a1e45899f86dbb9d5bef1f53fffa9dc05d44 (patch)
tree72d8ed7b5ee105ce47332e46c11a4f1a799e8b55 /eval.c
parent87626d48be8c54b4aa53cb4829ff1c3fc34eb02e (diff)
downloadtxr-d4b9a1e45899f86dbb9d5bef1f53fffa9dc05d44.tar.gz
txr-d4b9a1e45899f86dbb9d5bef1f53fffa9dc05d44.tar.bz2
txr-d4b9a1e45899f86dbb9d5bef1f53fffa9dc05d44.zip
* arith.c (succ, ssucc, sssucc, pred, ppred, pppred): New functions.
* eval.c (eval_init): Register new functions as intrinsics. * lib.h (succ, ssucc, sssucc, pred, ppred, pppred): Declared. * txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index dea40264..ab11ebef 100644
--- a/eval.c
+++ b/eval.c
@@ -3709,6 +3709,12 @@ void eval_init(void)
reg_fun(intern(lit("zerop"), user_package), func_n1(zerop));
reg_fun(intern(lit("evenp"), user_package), func_n1(evenp));
reg_fun(intern(lit("oddp"), user_package), func_n1(oddp));
+ reg_fun(intern(lit("succ"), user_package), func_n1(succ));
+ reg_fun(intern(lit("ssucc"), user_package), func_n1(ssucc));
+ reg_fun(intern(lit("sssucc"), user_package), func_n1(sssucc));
+ reg_fun(intern(lit("pred"), user_package), func_n1(pred));
+ reg_fun(intern(lit("ppred"), user_package), func_n1(ppred));
+ reg_fun(intern(lit("pppred"), user_package), func_n1(pppred));
reg_fun(intern(lit(">"), user_package), func_n1v(gtv));
reg_fun(intern(lit("<"), user_package), func_n1v(ltv));
reg_fun(intern(lit(">="), user_package), func_n1v(gev));