summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-22 20:41:54 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-22 20:41:54 -0700
commitd6760da67732419d8043d1fdc43e8081f96ef1f1 (patch)
tree021b792bbba89c65d5fbfeaa9132f6325988d11b /eval.c
parent0dd87c5b673f94f06263ace234e689e953bf3393 (diff)
downloadtxr-d6760da67732419d8043d1fdc43e8081f96ef1f1.tar.gz
txr-d6760da67732419d8043d1fdc43e8081f96ef1f1.tar.bz2
txr-d6760da67732419d8043d1fdc43e8081f96ef1f1.zip
Adding nthcdr as accessor.
* eval.c (eval_init): Register nthcdr function. * lib.c (nthcdr): New function. * lib.h (nthcdr): Declared. * share/txr/stdlib/place.tl (nthcdr): New defplace. * txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 67ac400d..6450501f 100644
--- a/eval.c
+++ b/eval.c
@@ -4164,6 +4164,7 @@ void eval_init(void)
reg_fun(intern(lit("reverse"), user_package), func_n1(reverse));
reg_fun(intern(lit("ldiff"), user_package), func_n2(ldiff));
reg_fun(intern(lit("last"), user_package), func_n1(last));
+ reg_fun(intern(lit("nthcdr"), user_package), func_n2(nthcdr));
reg_fun(intern(lit("flatten"), user_package), func_n1(flatten));
reg_fun(intern(lit("flatten*"), user_package), func_n1(lazy_flatten));
reg_fun(intern(lit("tuples"), user_package), func_n3o(tuples, 2));