diff options
-rw-r--r-- | lib.c | 1 | ||||
-rw-r--r-- | txr.1 | 8 |
2 files changed, 8 insertions, 1 deletions
@@ -454,7 +454,6 @@ val seq_begin(val obj) struct seq_iter *si = coerce(struct seq_iter *, chk_calloc(1, sizeof *si)); si_obj = cobj(coerce(mem_t *, si), seq_iter_s, &seq_iter_ops); seq_iter_init(self, si, obj); - si->inf.obj = nil; return si_obj; } @@ -31952,6 +31952,14 @@ If .meta object isn't a sequence, an exception is thrown. +Note that if +.meta object +is a lazy list, the returned iterator maintains a reference to the +head of that list during the traversal; therefore, generic iteration +based on iterators from +.code seq-begin +is not suitable for indefinite iteration over infinite lists. + .coNP Function @ seq-next .synb .mets (seq-next < iter << end-value ) |