Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
tri-curry* ( x y z p q r -- p' q' r' )
Factor handbook
>
The language
>
Combinators
>
Compositional combinators
>
Curried dataflow combinators
Prev:
bi-curry* ( x y p q -- p' q' )
Next:
bi-curry@ ( x y q -- p' q' )
Vocabulary
kernel
Inputs and outputs
x
an
object
y
an
object
z
an
object
p
a
quotation
with stack effect
( x -- ... )
q
a
quotation
with stack effect
( y -- ... )
r
a
quotation
with stack effect
( z -- ... )
p'
[ x p ]
q'
[ y q ]
r'
[ z r ]
Word description
Partially applies
p
to
x
,
q
to
y
and
r
to
z
.
Notes
The following two lines are equivalent:
[ p ] [ q ] [ r ] tri-curry* [ call ] tri@ [ p ] [ q ] [ r ] tri*
The combination
tri-curry* tri
is equivalent to a stack shuffle preceding
2tri*
:
[ p ] [ q ] [ r ] tri-curry* tri [ [ over ] dip over ] dip [ p ] [ q ] [ r ] 2tri*
Definition
USING:
kernel.private
;
IN:
kernel
:
tri-curry*
( x y z p q r -- p' q' r' )
[
currier
]
tri@
tri*
;
inline