Re: Currying + function in Clojure

2011-11-29 Thread Tassilo Horn
Leandro Moreira writes: Hi Leandro, > I'm starting to learn about functional programming and I reach the > concept *"Currying functions".* It is the technique of *transforming* > a function that takes *multiple arguments* (or an n-tuple of > arguments) in such a way that it can be called as a *c

Re: Currying + function in Clojure

2011-11-28 Thread Stuart Sierra
Hi Leandro, Clojure does not curry functions automatically like Haskell or some other functional languages. Instead, you can use the "partial" function to create partially-applied functions: Clojure 1.3.0 user=> (def add3 (partial + 3)) #'user/add3 user=> (add3 5) 8 Regards, -Stuart Sierra cloju