From: Ken Bloom Date: 2007-05-29T04:40:14+09:00 Subject: Re: Perspectives for Ruby 2.0 On Tue, 29 May 2007 00:36:27 +1000, Michael Hollins wrote: > arcadiorubiogarcia@gmail.com wrote: >> On May 27, 12:31 pm, Michael Hollins wrote: >>> arcadiorubiogar...@gmail.com wrote: >>> >>>> 1. Are there any plans to introduce function currying? It's a very >>>> useful feature for function expressions, and it won't be very >>>> difficult to add. In fact, far I've seen a few implementations of it >>>> out there. They seem to be more or less ok, but it would be great to >>>> have it on the standard distribution. >>> what would you want beyond the following? >>> >>> http://moonbase.rydia.net/mental/blog/programming/currying-in-ruby >> >> Well I would want something more implicit, like in Groovy for instance: >> http://www.ibm.com/developerworks/java/library/j-pg08235/index.html >> >> >> > So, just so I understand, take the following example: > > def multiply(a,b) > a * b > end > > triple = lambda { |a| multiply(a,3) } > > puts triple.call(10) > > I believe you are saying that you'd like the last line to be: > > puts triple(10) > > Is that right? If so, then I agree that would be nice. The choice of syntax for calling the function also has nothing to do with currying. -- Ken Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/