Handbook
Glossary
take-all ( gen -- seq )
Generators
Prev:
take ( gen n -- seq )
Next:
next* ( v gen -- result )
Vocabulary
generators
Inputs
gen
a
generator
Outputs
seq
a
sequence
Word description
Runs the generator until completion, collecting all yielded values into a sequence.
Definition
USING:
kernel
sequences
;
IN:
generators
::
take-all
( gen -- seq )
V{
}
clone
:>
accum
[
[
gen
next
accum
push
t
]
loop
]
[
]
catch-stop-generator
accum
{
}
like
;