diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-04-16 21:46:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-04-16 21:46:37 -0700 |
commit | b159479d567b6e69b292ec5248155d476eba72f3 (patch) | |
tree | 0828d9e7641147aa0687cb65c48404ae12533fdb /lib.h | |
parent | ef7aabdf51f95ef9e13f72efdf5d66ee3bc58ceb (diff) | |
download | txr-b159479d567b6e69b292ec5248155d476eba72f3.tar.gz txr-b159479d567b6e69b292ec5248155d476eba72f3.tar.bz2 txr-b159479d567b6e69b292ec5248155d476eba72f3.zip |
New function: iter-cat.
* eval.c (eval_init): Register iter-cat intrinsic.
* lib.h (struct seq_iter): New union member dargs.
(iter_catv): Declared.
* lib.c (seq_iter_get_cat, seq_iter_peek_cat): New
static functions.
(si_cat_ops): New static structure.
(iter_catv): New function.
* tests/012/iter.tl: New tests.
* txr.1: Documented.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -456,6 +456,7 @@ typedef struct seq_iter { val vbound; cnum cbound; val next; + val dargs; } ul; struct seq_iter_ops *ops; } seq_iter_t; @@ -766,6 +767,7 @@ val iter_more(val iter); val iter_item(val iter); val iter_step(val iter); val iter_reset(val iter, val obj); +val iter_catv(varg iters); void seq_build_init(val self, seq_build_t *bu, val likeobj); void seq_add(seq_build_t *bu, val item); void seq_pend(seq_build_t *bu, val items); |