Handbook
Glossary
2keep-under ( quot -- quot' )
Extra combinators
Prev:
keep-under ( quot -- quot' )
Next:
3keep-under ( quot -- quot' )
Vocabulary
combinators
.
extras
Inputs
quot
a
quotation
Outputs
None
Word description
Calls a quotation with two values on the stack, restoring the values below the outputs when the quotation returns.
Definition
USING:
combinators.smart
generalizations
kernel
math
;
IN:
combinators.extras
MACRO:
2keep-under
( quot -- quot' )
dup
outputs
2
+
[
[
2keep
2
]
curry
]
dip
[
0
-nrotated
]
curry
compose
;