On Feb 16, 8:20 am, Lin Jen-Shin <god... / gmail.com> wrote:

> You might want to have a look at gem ludy for Proc#bind,http://ludy.rubyforge.org/classes/Proc.html#M000042
>
> I'd written Proc#curry as well, so you can write as following:
>
> godfat ~> irb
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'ludy/proc'
> => true
> irb(main):003:0> lambda{|x,y,z|[x,y,z]}.curry.bind(:_1, 2, :_2)[1,3]
> => [1, 2, 3]

I suspect you did not need the call to #curry there?

Interesting, does it allow .bind(:_1, 2, :_1)[3] ?

> I am glad to see Proc#curry can be added into core, not supporting
> with library,
> but I didn't see there's Proc#uncurry as well. I hope there's one too.

Is it a full reversible processes?

T.