diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-06-19 19:30:35 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-06-19 19:30:35 -0700 |
commit | 635aa6b2b6395a1f7c20cd4182f7be261f98b36e (patch) | |
tree | 99993497512613bc7db24b280cab59b37b452fbf | |
parent | 9108b4f578927c28745a5bed97765044b8e41070 (diff) | |
download | txr-635aa6b2b6395a1f7c20cd4182f7be261f98b36e.tar.gz txr-635aa6b2b6395a1f7c20cd4182f7be261f98b36e.tar.bz2 txr-635aa6b2b6395a1f7c20cd4182f7be261f98b36e.zip |
doc: iter-begin copies iterators.
* txr.1: Revise text which claims that when iter-begin
is invoked on an existing iterator, the returned iterator
may share state it. We recently fixed that with the cloning.
-rw-r--r-- | txr.1 | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -39623,17 +39623,6 @@ 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. @@ -39647,6 +39636,18 @@ or methods. A struct object supporting none of these methods is deemed not iterable. +Otherwise, if +.meta seq +is an iterator object of +.code seq-iter +type, such as one produced by +.codn iter-begin , +then an iterator similar to that iterator is returned, as if produced +by applying the +.code copy-iter +function to +.metn seq . + In all other cases, if .meta seq is iterable, an object of type |