spread ( objs... seq -- ) (original) (raw)
Vocabulary
combinators
Inputs
objs... | objects |
---|---|
seq | a sequence of quotations with stack effect ( x -- ... ) |
Outputs
None
Word description
Applies each quotation to the objects 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
Definition