diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-28 07:17:12 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-28 07:17:12 -0700 |
commit | dc7842296466eba508f791ef1f9a9c3b16f7d4da (patch) | |
tree | f64003ee37f12b7baa77a284154b2c7f691f9943 /txr.1 | |
parent | 64fb78f1b28fa435f97dbf5fda1c574338063083 (diff) | |
download | txr-dc7842296466eba508f791ef1f9a9c3b16f7d4da.tar.gz txr-dc7842296466eba508f791ef1f9a9c3b16f7d4da.tar.bz2 txr-dc7842296466eba508f791ef1f9a9c3b16f7d4da.zip |
seq-begin: bugfix: non-lists don't work.
* lib.c (seq_begin): Do not null out si->inf.obj; it's needed
for accessing hashes and vector-like objects. This bug means
that seq-begin iteration has only worked correctly for lists.
The original motivation was not to have spurious retention of
the head of a lazy list, which is hereby reintroduced. But
iterators can be rewound. Let's just document this away and
leave it as a to-do item.
* txr.1: Document the limitation of seq-begin w.r.t.
lazy lists.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 ) |