collector ( quot -- quot' vec )
Factor handbook » The language » Collections » Sequence operations » Implementing sequence combinators

Next:collector-as ( quot exemplar -- quot' vec )


Vocabulary
sequences

Inputs
quota quotation


Outputs
quot'a quotation
veca vector


Word description
Creates a new quotation that pushes its result to a vector and outputs that vector on the stack.

Examples
USING: sequences prettyprint kernel math ; { 1 2 } [ 30 + ] collector [ each ] dip .
V{ 31 32 }


Definition