summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-22 07:37:22 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-22 07:37:22 -0700
commit420a230dbae897ee32c03297f7e4bb18f683a8b1 (patch)
treeca542bbde5776b9a5f8ed5ecbd1769dc19956038 /eval.c
parentfb8a30d4540d04b02f98e7895cdb02d5c7f6c2e6 (diff)
downloadtxr-420a230dbae897ee32c03297f7e4bb18f683a8b1.tar.gz
txr-420a230dbae897ee32c03297f7e4bb18f683a8b1.tar.bz2
txr-420a230dbae897ee32c03297f7e4bb18f683a8b1.zip
Implementing second through tenth as places.
* eval.c (eval_init): Register second through tenth as intrinsic. * gencadr.txr: New cadr.c changes encoded. * lib.c (second, third, fourth, fifth, sixth): Functions reimplemented using ref, so they are much more efficient for vectors and strings. (seventh, eighth, ninth, tenth): New functions. * lib.h (seventh, eighth, ninth, tenth): Declared. * share/txr/stdlib/place.tl: place macros defined for second through tenth. * txr.1: 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 e0ef15a8..0a9e89de 100644
--- a/eval.c
+++ b/eval.c
@@ -4140,6 +4140,10 @@ void eval_init(void)
reg_fun(intern(lit("fourth"), user_package), func_n1(fourth));
reg_fun(intern(lit("fifth"), user_package), func_n1(fifth));
reg_fun(intern(lit("sixth"), user_package), func_n1(sixth));
+ reg_fun(intern(lit("seventh"), user_package), func_n1(seventh));
+ reg_fun(intern(lit("eighth"), user_package), func_n1(eighth));
+ reg_fun(intern(lit("ninth"), user_package), func_n1(ninth));
+ reg_fun(intern(lit("tenth"), user_package), func_n1(tenth));
reg_fun(intern(lit("conses"), user_package), func_n1(conses));
reg_fun(intern(lit("conses*"), user_package), func_n1(lazy_conses));
reg_fun(intern(lit("copy-list"), user_package), func_n1(copy_list));