|
![](/i/fill.gif) |
>> What, defining three pages of code is longer than the 1-liner I posted?
>>
>> The ($) operator is defined in the Haskell language standard. :-P
>
> The o operator is defined in my personal standard and I never look back. ;)
OK, but ($) is still a 1-liner:
f $ x = f x
And, unlike your notation, it doesn't require any brackets at all! ;-)
BTW, what would you say the most irritating library design flaw in
Scheme is? In Haskell, my personal one is this:
filter odd [1, 2, 3, 4]
That takes a list and filters out the odd numbers, right?
WRONG!
It filters out the *even* numbers.
Like, WTF?
Obviously what they *should* have done is name it "select". Then you
would write
select odd [1, 2, 3, 4]
and it would be completely obvious what it does. Hey, it works for SQL
and Smalltalk, why not Haskell? *sigh* I keep thinking that
filter f = select (not . f)
Post a reply to this message
|
![](/i/fill.gif) |