On May 30, 12:58 pm, eyeris <drewpvo...@gmail.com> wrote:
> The ubiquity of these anonymous functions
> in clojure code is evidence that partial application is just as needed
> in clojure as it is in haskell.
Doesn't that depend entirely on whether or not the anonymous functions
are being used for partial application? Does every function one uses
in a list comprehension get classified as a partial application? That
would seem over-broad to me. From my novice position, it seems the
utility of partial is that I can pre-apply some args and then pass
that function along as either an arg or a return, and even then only
when the args happen to be in the right spot. If anything, I'm
inclined to think partial is a more limited, more verbose sibling of #
().
>
> On May 29, 10:40 pm, Vagif Verdi <vagif.ve...@gmail.com> wrote:
>
> > On May 27, 11:57 pm, kinghajj <kingh...@gmail.com> wrote:
>
> > > Example:
> > > (def add5 ($ + 5))
>
> > > (add5 3)
>
> > I love partial application in haskell. But do not see the need for it
> > in clojure with its succinct syntax for anonymous functions:
>
> > (def add5 #(+ 5 %1))
>
> > (add5 3)
>
> > Besides clojure's anonymous function syntax allows you to replace any
> > argument, not just the last one, like your partial macro.
--~--~---------~--~----~------------~-------~--~----~
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
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---