with ( param obj quot -- obj curried )
Factor handbook > The language > Combinators > Compositional combinators

Prev:3curry ( obj1 obj2 obj3 quot -- curried )
Next:prepose ( quot1 quot2 -- composed )


Vocabulary
kernel

Inputs and outputs
paraman object
objan object
quota quotation with stack effect ( param elt -- ... )
currya curried


Word description
Partial application on the left. The following two lines are equivalent:
swap [ swap A ] curry B

[ A ] with B


Notes
This operation is efficient and does not copy the quotation.

Examples
USING: kernel math prettyprint sequences ; 1 { 1 2 3 } [ / ] with map .
{ 1 1/2 1/3 }

USING: kernel math prettyprint sequences ; 1000 100 5 <iota> [ sq + + ] 2with map .
{ 1100 1101 1104 1109 1116 }


Definition

: with ( param obj quot -- obj curried )
swapd [ swapd call ] 2curry ; inline