3tri ( x y z p q r -- )
Factor handbook > The language > Combinators > Dataflow combinators > Cleave combinators

Prev:2tri ( x y p q r -- )
Next:cleave ( x seq -- )


Vocabulary
kernel

Inputs and outputs
xan object
yan object
zan object
pa quotation with stack effect ( x y z -- ... )
qa quotation with stack effect ( x y z -- ... )
ra quotation with stack effect ( x y z -- ... )


Word description
Applies p to the three input values, then applies q to the three input values, and finally applies r to the three input values.

Examples
If [ p ], [ q ] and [ r ] have stack effect ( x y z -- ), then the following two lines are equivalent:
[ p ] [ q ] [ r ] 3tri 3dup p 3dup q r

In general, the following two lines are equivalent:
[ p ] [ q ] [ r ] 3tri [ p ] 3keep [ q ] 3keep r


Definition

: 3tri ( x y z p q r -- ) [ [ 3keep ] dip 3keep ] dip call ;
inline