spread ( objs... seq -- )
Factor handbook > The language > Combinators > Dataflow combinators > Spread combinators

Prev:2tri* ( u v w x y z p q r -- )


Vocabulary
combinators

Inputs and outputs
objs...objects
seqa sequence of quotations with stack effect ( x -- ... )


Word description
Applies each quotation to the object in turn.

Examples
The bi* combinator takes two values and two quotations; the tri* combinator takes three values and three quotations. The spread combinator takes n values and n quotations, where n is the length of the input sequence, and is essentially equivalent to a nested series of dips:
! Equivalent { [ p ] [ q ] [ r ] [ s ] } spread [ [ [ p ] dip q ] dip r ] dip s


See also
bi*, tri*

Definition