Vocabulary

kernel

Inputs and outputs

Word description

Applies p to x, then applies q to x, and finally applies r to x.

Examples

If [ p ], [ q ] and [ r ] have stack effect ( x -- ), then the following two lines are equivalent:

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

In general, the following two lines are equivalent:

See also

bi, cleave

Definition

kernel

Inputs and outputs

x | an object |

p | a quotation with stack effect ( x -- ... ) |

q | a quotation with stack effect ( x -- ... ) |

r | a quotation with stack effect ( x -- ... ) |

Word description

Applies p to x, then applies q to x, and finally applies r to x.

Examples

If [ p ], [ q ] and [ r ] have stack effect ( x -- ), then the following two lines are equivalent:

[ p ] [ q ] [ r ] tri
dup p dup q r

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

[ p ] [ q ] [ r ] tri
dup p over q rot r

In general, the following two lines are equivalent:

[ p ] [ q ] [ r ] tri
[ p ] keep [ q ] keep r

See also

bi, cleave

Definition