atreyu <atreyu....@gmail.com> writes:

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

Too bad Liskell [1] is dead, or there would be a language with both
currying and macros (aside from forth/factor which probably have both
but don't count).

Personally, I'd be happy to give up multivariadic functions (they always
seem to need `apply' anyways) in exchange for a simpler curried language
in which functions can only take a single argument.  I'm not trying to
suggest that this would be good for Clojure (or for anything implemented
over the java VM) this is just a property I'd want in my perfect lisp.

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

Footnotes: 
[1]  http://www.liskell.org/
     http://blog.clemens.endorphin.org/2009/01/liskell-standalone.html

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