diff options
author | Kaz Kyheku <kaz@kylheku.com> | 2020-02-24 23:03:08 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-02-24 23:03:08 -0800 |
commit | 0e3c047c3fa3ef7d3e7168314bf6fdb0ba15443d (patch) | |
tree | ef7aa64fa706ae84f823cb725b63c4b91b4be4b5 /eval.c | |
parent | 3830cf321258321719865709081a709c97fd4e0a (diff) | |
download | txr-0e3c047c3fa3ef7d3e7168314bf6fdb0ba15443d.tar.gz txr-0e3c047c3fa3ef7d3e7168314bf6fdb0ba15443d.tar.bz2 txr-0e3c047c3fa3ef7d3e7168314bf6fdb0ba15443d.zip |
New function: assq and rassq.
TXR Lisp is henceforth a dialect in which
(cdr (assq key a-list))
works exactly as shown, without substitution of
assql or assoc.
* eval.c (eval_init): Register assq and rassq intrinsics.
* lib.c (assq, rassq): New functions.
* lib.h (assq, rassq): Declared.
* txr.1: Documented.
* tests/012/ashwin.tl: New file.
* tests/012/ashwin.expected: New file.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -6813,8 +6813,10 @@ void eval_init(void) reg_fun(intern(lit("assoc"), user_package), func_n2(assoc)); reg_fun(intern(lit("assql"), user_package), func_n2(assql)); + reg_fun(intern(lit("assq"), user_package), func_n2(assq)); reg_fun(intern(lit("rassoc"), user_package), func_n2(rassoc)); reg_fun(intern(lit("rassql"), user_package), func_n2(rassql)); + reg_fun(intern(lit("rassq"), user_package), func_n2(rassq)); reg_fun(intern(lit("acons"), user_package), func_n3(acons)); reg_fun(intern(lit("acons-new"), user_package), func_n3(acons_new)); reg_fun(intern(lit("aconsql-new"), user_package), func_n3(aconsql_new)); |