reduce-outputs ( quot operation -- )
Factor handbook » The language » Combinators » Smart combinators

Prev:output>array ( quot -- array )
Next:map-reduce-outputs ( quot mapper reducer -- quot )


Vocabulary
combinators.smart

Inputs
quota quotation
operationa quotation


Outputs
None

Word description
Infers the number of outputs from quot and reduces them using operation. The identity for the reduce operation is the first output.

Examples
USING: combinators.smart kernel math prettyprint ; 3 [ [ 4 * ] [ 4 / ] [ 4 - ] tri ] [ * ] reduce-outputs .
-9


Definition