4keep-under ( quot -- quot' ) - Factor Documentation

4keep-under ( quot -- quot' )
Extra combinators



Vocabulary
combinators .extras

Inputs
quot a quotation


Outputs
None

Word description
Calls a quotation with four values on the stack, restoring the values below the outputs when the quotation returns.

Definition
USING: combinators.smart kernel math shuffle ;

IN: combinators.extras

MACRO: 4keep-under ( quot -- quot' )
dup outputs 4 + [ [ 4keep 4 ] curry ] dip
[ 0 -nrotated ] curry compose ;

AltStyle によって変換されたページ (->オリジナル) /