From: Nat Pryce Date: 2002-08-27T19:21:45+09:00 Subject: Re: What New Language After Ruby? On Tue, 2002-08-27 at 07:58, Rafael 'Dido' Sevilla wrote: > Scheme and Lisp allow you to have curried functions if you so desire, > e.g.: > > (define a-curried-function > (lambda (x) > (lambda (y) ...)))) > > except that you wind up getting ugly calls that look like this > > ((a-curried-function foo) bar) > > all over the place, making the irritating parentheses problem even worse > than it already is. :) Exactly. Currying is not supported by the language. Although it can be implemented by hand, it is not as convenient as when provided by the language itself. E.g. in Scheme, a function to add 2 to a number has to be defined as: (define (add2 x) (+ x 2)) while in Haskell it's add2 = + 2 This example is pretty simple, but the advantages of currying are most apparent when using higher order functions. E.g. compare: define (double a-list) (map (lambda (x) (* x 2)) a-list)) to: double a_list = map (* 2) a_list Cheers, Nat. -- Dr. Nathaniel Pryce, Technical Director, B13media Ltd. Studio 3a, 22-24 Highbury Grove, London N5 2EA, UK http://www.b13media.com