Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
smart-with ( param obj quot -- obj curry )
Vocabulary
combinators.smart
Inputs and outputs
param
an
object
obj
an
object
quot
a
quotation
with stack effect
( param ..a -- ..b
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