Handbook
Glossary
smart-with ( param obj quot -- obj curry )
Vocabulary
combinators
.
smart
Inputs
param
an
object
obj
an
object
quot
a
quotation
with stack effect
( param ..a -- ..b )
Outputs
obj
an
object
curry
a
curry
Word description
A version of
with
that puts the parameter before any inputs the quotation uses.
Definition
USING:
generalizations
kernel
;
IN:
combinators.smart
:
smart-with
( param obj quot -- obj curry )
swapd
dup
inputs
[
-nrot
]
curry
[
dip
call
]
curry
2curry
;
inline