Vocabulary

kernel

Inputs and outputs

Word description

Partially applies p and q to x.

Notes

The following two lines are equivalent:

Higher-arity variants of bi can be built from bi-curry:

The combination bi-curry bi* cannot be expressed with the non-currying dataflow combinators alone; it is equivalent to a stack shuffle preceding 2bi*:

To put it another way, bi-curry bi* handles the case where you have three values a b c on the stack, and you wish to apply p to a c and q to b c.

Definition

kernel

Inputs and outputs

x | an object |

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

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

p' | [ x p ] |

q' | [ x q ] |

Word description

Partially applies p and q to x.

Notes

The following two lines are equivalent:

[ p ] [ q ] bi-curry [ call ] bi@
[ p ] [ q ] bi

Higher-arity variants of bi can be built from bi-curry:

[ p ] [ q ] bi-curry bi == [ p ] [ q ] 2bi
[ p ] [ q ] bi-curry bi-curry bi == [ p ] [ q ] 3bi

The combination bi-curry bi* cannot be expressed with the non-currying dataflow combinators alone; it is equivalent to a stack shuffle preceding 2bi*:

[ p ] [ q ] bi-curry bi*
[ swap ] keep [ p ] [ q ] 2bi*

To put it another way, bi-curry bi* handles the case where you have three values a b c on the stack, and you wish to apply p to a c and q to b c.

Definition