[Haskell-cafe] Made me smile

Andrew Coppin andrewcoppin at btinternet.com
Fri May 18 15:59:28 EDT 2007


OK, so I was hanging out on this newsgroup I often lurk. And we're 
having a discussion. And I'm all like "Haskell is the greatest!" And 
they're all like "nah, Haskell sux". And this one dude goes "hey, look 
at this C++ code. How do you do that in Haskell?" And three other people 
look at this C++ and can't figure out what the heck it even does. So 
eventually he tells us what it does, and so I post some Haskell in a 
reply. And the some other guy writes this...

(OK, not much point to this email. But it seriously made me LOL IRL!)





Invisible wrote:
>>>> int main()
>>>> {
>>>>     typedef std::istream_iterator<std::string> Is;
>>>>     typedef std::ostream_iterator<std::string> Os;
>>>>     std::set<std::string> t((Is(std::cin)), Is());
>>>>     std::copy(t.begin(), t.end(), Os(std::cout, "\n"));
>>>> }

> OK then.
> main = interact $ unlines . sort . nub . words

Pwned!

-- 
  Darren New / San Diego, CA, USA (PST)
    His kernel fu is strong.
    He studied at the Shao Linux Temple.


More information about the Haskell-Cafe mailing list