diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-02-09 06:25:11 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-02-09 06:25:11 -0800 |
commit | c2032024f5e5121dba9a629f5e6a182ca5d45f16 (patch) | |
tree | bcc2195735027e7133ee91249d349dc9be15584c /lib.h | |
parent | cd4d38de19b8ec286c70992bdda1c85f265b9a07 (diff) | |
download | txr-c2032024f5e5121dba9a629f5e6a182ca5d45f16.tar.gz txr-c2032024f5e5121dba9a629f5e6a182ca5d45f16.tar.bz2 txr-c2032024f5e5121dba9a629f5e6a182ca5d45f16.zip |
New function: cons-find.
* eval.c (cons_find): Static function removed; a new one is
implemented in lib.c.
(eval_init): Register cons-find intrinsic.
* lib.c (cons_find_rec): New static function.
(cons_find): New function.
* lib.h (cons_find): Declared.
* tests/012/cons.tl: New file.
* txr.1: Documented cons-find together with tree-find.
Document that tree-find's test-fun argument is optional,
defaulting to equal.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -858,6 +858,7 @@ val remqual_lazy(val obj, val list); val remove_if_lazy(val pred, val list, val key); val keep_if_lazy(val pred, val list, val key); val tree_find(val obj, val tree, val testfun); +val cons_find(val obj, val tree, val testfun); val countqual(val obj, val list); val countql(val obj, val list); val countq(val obj, val list); |