loop>sequence ( ... quot: ( ... -- ... obj/f ) exemplar -- ... seq )


Vocabulary
sequences.extras

Inputs
quota quotation
exemplaran object


Outputs
seqa 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


: loop>sequence
( ... quot: ( ... -- ... obj/f ) exemplar -- ... seq )
[ [ dup ] compose [ ] ] dip produce-as nip ; inline