From 008fccfa96b61189c0056ff5e3b708be1aa02f45 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 11 Nov 2015 06:40:24 -0800 Subject: Adding revappend and nreconc. * eval.c (eval_init): Register revappend and nreconc intrinsics. * lib.c (list_collect_nreconc): New function. (revlist): New static function. (list_collect_revappend): New function. (revappend, nreconc): New functions. * lib.h (revappend, nreconc): Declared. (list_collect_nreconc, list_collect_revappend): Declared. * txr.1: Documented revappend and nreconc. --- eval.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 099c1327..fd5a720f 100644 --- a/eval.c +++ b/eval.c @@ -4420,6 +4420,8 @@ void eval_init(void) reg_fun(append_s, func_n0v(appendv)); reg_fun(intern(lit("append*"), user_package), func_n0v(lazy_appendv)); reg_fun(intern(lit("nconc"), user_package), func_n0v(nconcv)); + reg_fun(intern(lit("revappend"), user_package), func_n2(revappend)); + reg_fun(intern(lit("nreconc"), user_package), func_n2(nreconc)); reg_fun(list_s, list_f); reg_fun(intern(lit("list*"), user_package), func_n0v(list_star_intrinsic)); reg_fun(identity_s, identity_f); -- cgit v1.2.3