Handbook
Glossary
output>array ( quot -- array )
Factor handbook
»
The language
»
Combinators
»
Smart combinators
Prev:
output>sequence ( quot exemplar -- seq )
Next:
reduce-outputs ( quot operation -- )
Vocabulary
combinators
.
smart
Inputs
quot
a
quotation
Outputs
array
an
array
Word description
Infers the number of outputs from the quotation and constructs an array from those outputs. Known captures in curried and composed quotations are preserved during inference, including when smart combinators are nested.
Examples
USING: combinators combinators.smart math prettyprint ; 9 [ { [ 1 - ] [ 1 + ] [ sq ] } cleave ] output>array .
{ 8 10 81 }
Definition
IN:
combinators.smart
:
output>array
( quot -- array )
{
}
output>sequence
;
inline