bi-curry* ( x y p q -- p' q' )

Factor handbook » The language » Combinators » Compositional combinators » Curried dataflow combinators

Factor handbook » The language » Combinators » Compositional combinators » Curried dataflow combinators

Prev: | tri-curry ( x p q r -- p' q' r' ) |

Next: | tri-curry* ( x y z p q r -- p' q' r' ) |

Vocabulary

kernel

Inputs

Outputs

Word description

Partially applies p to x, and q to y.

Notes

The following two lines are equivalent:

The combination bi-curry* bi is equivalent to a stack shuffle preceding 2bi*:

In other words, bi-curry* bi handles the case where you have the three values a b c on the stack, and you wish to apply p to a b and q to a c.

The combination bi-curry* bi* is equivalent to a stack shuffle preceding 2bi*:

In other words, bi-curry* bi* handles the case where you have the four values a b c d on the stack, and you wish to apply p to a c and q to b d.

Definition

kernel

Inputs

x | an object |

y | an object |

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

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

Outputs

p' | [ x p ] |

q' | [ y q ] |

Word description

Partially applies p to x, and q to y.

Notes

The following two lines are equivalent:

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

The combination bi-curry* bi is equivalent to a stack shuffle preceding 2bi*:

[ p ] [ q ] bi-curry* bi
[ over ] dip [ p ] [ q ] 2bi*

In other words, bi-curry* bi handles the case where you have the three values a b c on the stack, and you wish to apply p to a b and q to a c.

The combination bi-curry* bi* is equivalent to a stack shuffle preceding 2bi*:

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

In other words, bi-curry* bi* handles the case where you have the four values a b c d on the stack, and you wish to apply p to a c and q to b d.

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 (2276, heads/master-c890a67c5b, Jul 24 2024 11:34:39)