diff options
-rw-r--r-- | lib.c | 5 | ||||
-rw-r--r-- | txr.1 | 11 |
2 files changed, 16 insertions, 0 deletions
@@ -987,6 +987,11 @@ void seq_iter_init_with_info(val self, seq_iter_t *it, } } } + if (it->inf.obj->co.cls == seq_iter_cls) + { + *it = *coerce(struct seq_iter *, it->inf.obj->co.handle); + break; + } if (it->inf.obj->co.cls == tree_iter_cls) { it->ui.iter = if3(support_rewind, @@ -35607,6 +35607,17 @@ is a number. If .meta seq +is an iterator produced by +.code iter-begin +then an iterator similar to that iterator is returned, which can continue +iterating the same sequence. The iterator may be +.meta seq +itself or share state with +.metn seq , +and thus may not be relied on to produce an independent, parallel iteration. + +If +.meta seq is a structure which supports the .code iter-begin method, then that method is called and its return value is returned. |