zero-loop>array ( quot: ( ..a n -- ..a obj ) -- seq )


Vocabulary
sequences.extras

Inputs
quota quotation


Outputs
seqa sequence


Word description
Call quot, which takes an integer starting from zero and incrementing on every loop, and should output an object, and collect the objects in array until quot outputs f.

Examples
Example:
USING: sequences.extras prettyprint math.text.english math kernel ; [ dup 5 < [ number>text ] [ drop f ] if ] zero-loop>array .
{ "zero" "one" "two" "three" "four" }


See also
loop>array, loop>array*, loop>array**, loop>sequence, loop>sequence*, loop>sequence**, zero-loop>sequence

Definition

: zero-loop>array ( quot: ( ..a n -- ..a obj ) -- seq )
{ } zero-loop>sequence ; inline