3keep ( ..a x y z quot: ( ..a x y z -- ..b ) -- ..b x y z ) (original) (raw)
3keep ( ..a x y z quot: ( ..a x y z -- ..b ) -- ..b x y z )
Factor handbook » The language » Combinators » Dataflow combinators » Preserving combinators
Prev: | 2keep ( ..a x y quot: ( ..a x y -- ..b ) -- ..b x y ) |
---|
Vocabulary
kernel
Inputs
x | an object |
---|---|
y | an object |
z | an object |
quot | a quotation with stack effect ( ..a x y z -- ..b ) |
Outputs
x | an object |
---|---|
y | an object |
z | an object |
Word description
Calls a quotation with three values on the stack, restoring the values when the quotation returns.
Definition
: 3keep
( ..a x y z quot: ( ..a x y z -- ..b ) -- ..b x y z )
[ 3dup ] dip 3dip ; inline