On Feb 15, 12:46 pm, Yukihiro Matsumoto <m... / ruby-lang.org> wrote:
> Hi,
>
> In message "Re: Proc#curry"
>     on Sat, 16 Feb 2008 02:35:23 +0900, Trans <transf... / gmail.com> writes:
>
> |Is there a link where I can read about how this new function works?
>
> [ruby-dev:33676], if you don't mind seeing Japanese ;-)
>
> If you do mind, it's OK.  It's not difficult at all,
>
>   proc {|x, y, z| x + y + z }.curry
>
> returns the proc object equivalent to
>
>   proc {|x| proc {|y| proc {|z| x + y + z } } }
>
> See?

Yep. I see.

It is rather trivial, I agree. Unfortunately maybe too trivial because
were stuck with the order of arguments. Or doe curry take some
argument to vary that? To clarify what I mean, Facets has an
implementation of curry, for both Proc and Method, like so:

  proc {|x, y, z| x + y + z }.curry(__,__,__)

Of course I like your better in this case ;-)  BUT, it does allow:

  proc {|x, y, z| x + y + z }.curry(__,5,__)

for:

  proc {|x| proc {|z| x + 5 + z } }

T.