partial vs currying

4 views
Skip to first unread message

Miki

unread,
Feb 27, 2011, 7:02:10 PM2/27/11
to clj...@googlegroups.com
Greetings,

Some asked in the last meetup is partial is like currying. Here's a explanation from "The Joy of Clojure":

*Partial application is not currying*
The use of partial differs from the notion of currying in a
fundamental way. That is, a function built with partial will attempt
to evaluate whenever it's given another argument. A curried
function on the other hand will return another curried function until it
receives a pre-determined number of arguments -- whereupon it
will only then evaluate. Because Clojure allows functions of variable
number of arguments, currying makes little sense.

HTH,
--
Miki
Reply all
Reply to author
Forward
0 new messages