Handbook
Glossary
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
x
an
object
y
an
object
quot
a
quotation
with stack effect
( ..a x y -- ..b )
Outputs
x
an
object
y
an
object
Word description
Calls a quotation with two values on the stack, restoring the values when the quotation returns.
Definition
IN:
kernel
:
2keep
( ..a x y quot: ( ..a x y -- ..b ) -- ..b x y )
[
2dup
]
dip
2dip
;
inline