spread ( objs... seq -- )

Factor handbook » The language » Combinators » Dataflow combinators » Spread combinators

Factor handbook » The language » Combinators » Dataflow combinators » Spread combinators

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

Vocabulary

combinators

Inputs

Outputs

None

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:

See also

bi*, tri*

Definition

combinators

Inputs

objs... | objects |

seq | a sequence of quotations with stack effect ( x -- ... ) |

Outputs

None

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

This documentation was generated offline from a
`load-all`

image. If you want, you can also
browse the documentation from within the UI developer tools. See
the Factor website
for more information.

Factor 0.100 x86.64 (2270, heads/master-9a858f779b, Jun 12 2024 16:13:38)