sum-outputs ( quot -- n )
Factor handbook > The language > Combinators > Smart combinators

Prev:smart-apply ( quot n -- )
Next:append-outputs ( quot -- seq )


Vocabulary
combinators.smart

Inputs and outputs
quota quotation
nan integer


Word description
Infers the number of outputs from quot and returns their sum.

Examples
USING: combinators.smart kernel math prettyprint ; 10 [ [ 1 - ] [ 1 + ] bi ] sum-outputs .
20


Definition