On Oct 22, 6:45 pm, André Thieme <[EMAIL PROTECTED]> wrote:
> On 23 Okt., 00:28, wwmorgan <[EMAIL PROTECTED]> wrote:
>
> > You can get most of the functionality you're looking for with partial
>
> Yes sure. The thing is that currying is nothing but syntactical sugar.
> It's not the functionality I am missing, but it’s brevity which makes
> sense in functional programming style.
>
> And partial doesn't allow me to have a simplified syntax for going
> over specific arguments, which makes sense, so having this
> throw-away underscore is nice IMO.
> Also partial can't repeat arguments, what we now can do with %1, %1.

I think, in general, this proposal, while interesting, has the
difficulty that it reduces the power of #() to not much more than
currying, and has some presumptions that need to be checked.

For instance, all examples were specific, without a generalization of
the functionality, which hides a problem:

#(...) currently expands to (fn [args*] (...))

I'm not sure there is a good general definition of what you have
described. It seems to presume that ... will be an ordinary function
call which can be converted into an apply. But it need not be so:

Special forms or macros are supported:

#(if %3 %2 %1)

as are methods:

#(.foo %)

and more complex expressions:

#(do (foo %2) (bar %1))

Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to