diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-12-22 07:13:33 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-12-22 07:13:33 -0800 |
commit | 638293d5281db1276a3b64f2eb969ad99c0ee9f3 (patch) | |
tree | b9d369af312ea49431b89ae2da96a5e9e9f3e82f /eval.c | |
parent | 75b1508c61d3805d1678a8dabf8d48b9e76c8d37 (diff) | |
download | txr-638293d5281db1276a3b64f2eb969ad99c0ee9f3.tar.gz txr-638293d5281db1276a3b64f2eb969ad99c0ee9f3.tar.bz2 txr-638293d5281db1276a3b64f2eb969ad99c0ee9f3.zip |
New functions: subq, subql, subqual and subst.
* eval.c (eval_init): Register new intrinsics.
* lib.c, lib.h (subq, subql, subqual, subst): New functions.
* tests/012/seq.tl: New test cases.
* stdlib/optimize.tl (subst): Function removed. The new subst
drop-in replaces this one.
* txr.1: Documented.
* stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -6981,6 +6981,10 @@ void eval_init(void) reg_fun(intern(lit("rpos"), user_package), func_n4o(rpos, 2)); reg_fun(intern(lit("pos-if"), user_package), func_n3o(pos_if, 2)); reg_fun(intern(lit("rpos-if"), user_package), func_n3o(rpos_if, 2)); + reg_fun(intern(lit("subq"), user_package), func_n3(subq)); + reg_fun(intern(lit("subql"), user_package), func_n3(subql)); + reg_fun(intern(lit("subqual"), user_package), func_n3(subqual)); + reg_fun(intern(lit("subst"), user_package), func_n5o(subst, 3)); 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)); |