Yep, you have to use flip and it is not so elegant

Prelude> let f x y z=(x+z)*y
Prelude> map (flip (f 1) 2) [3,4,5]
[9,12,15]

OTOH in clojure we have, you guess..., macros!!!

user> (->> [[2 3][3 3][6 6]] (filter (comp even? sum)) concat2 (map
#(+ 5 %)))
(8 8 11 11)

i promise i'll not comment about (superficial) syntax in a month!!
:-P

On Nov 16, 11:35 am, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> On 16 Nov., 11:06, atreyu <atreyu....@gmail.com> wrote:
>
> > clojure is nice too for the example but if you'd add functions and
> > they have arity more than 1 haskell gets better (imo of course):
>
> And less than 3 if one is honest. Haskell is spicked with rather
> unmotivated "`foo` x"s which simply means #(foo % x) in a - IMHO -
> rather unobvious way. Do #(foo x % y) in Haskell... I'm missing the
> elegance somehow. In the end this is only superficial and does not
> affect the power of the underlying language in any way.
>
> Sincerely
> Meikel

-- 
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

Reply via email to