On 5/18/06, Berger, Daniel <Daniel.Berger / qwest.com> wrote:> Ah, ok.  Is there any kind of speed advantage to this approach?  Or is> it more of a design/DRY technique?

In functional languages, the compiler can reduce all the computationinvolving the curried args, storing the computation.This can make things faster.
f x y = (do_something_expensive_with x) + yf_15 = f 15 # takes a while because reduces            # (do_something_expensive_with 15) to a value(1..10000).map(f_15) # executes very fast
In ruby, it makes things slower :)(Two calls instead of one, no caching of results.)