2keep ( ..a x y quot: ( ..a x y -- ..b ) -- ..b x y )
Factor handbook » The language » Combinators » Dataflow combinators » Preserving combinators

Prev:keep ( ..a x quot: ( ..a x -- ..b ) -- ..b x )
Next:3keep ( ..a x y z quot: ( ..a x y z -- ..b ) -- ..b x y z )


Vocabulary
kernel

Inputs
xan object
yan object
quota quotation with stack effect ( ..a x y -- ..b )


Outputs
xan object
yan object


Word description
Calls a quotation with two values on the stack, restoring the values when the quotation returns.

Definition

: 2keep ( ..a x y quot: ( ..a x y -- ..b ) -- ..b x y )
[ 2dup ] dip 2dip ; inline