Handbook
Glossary
loop>sequence ( ... quot: ( ... -- ... obj/f ) exemplar -- ... seq )
Vocabulary
sequences
.
extras
Inputs
quot
a
quotation
exemplar
an
object
Outputs
seq
a
sequence
Word description
Call
quot
, which should output an object or
f
, and collect the objects in
seq
of type
exemplar
until
quot
outputs
f
.
Examples
USING: sequences.extras prettyprint io.encodings.binary io.streams.byte-array io ; B{ 10 20 30 } binary [ [ read1 ] V{ } loop>sequence ] with-byte-reader .
V{ 10 20 30 }
See also
loop>array
,
loop>array*
,
loop>array**
,
loop>sequence*
,
loop>sequence**
,
zero-loop>array
,
zero-loop>sequence
Definition
USING:
kernel
sequences
;
IN:
sequences.extras
:
loop>sequence
( ... quot: ( ... -- ... obj/f ) exemplar -- ... seq )
[
[
dup
]
compose
[
]
]
dip
produce-as
nip
;
inline