I love it. Haskell is by far my favorite language. Anyone else tried it or do it?
I poked around F# a bit out of curiosity...Didn't like it. We'll be doing Haskell next year in my degree program. Not looking forward to it![]()
Check out Clojure. Recently learnt it at my internship. Hated it first. Then found it out how amazing functional languages can be.
I <3 Haskell!
Its like writing out math!
I thought I'd always be a Python-masterrace person, but not anymore!
It really is. I am a Haskell master race sort of person now.
It seems like a hassle to learn at first, but it really changes the way you think about stuff. Like whenever I do python now I just think "Why doesn't this have a very convenient takeWhile" etc etc.
Also the annotations are really nice.
Yes. It is a whole different way of looking at problems. I also hate for loops now. Iterators are also stupid. Map is the the way of the future.
f x
| even x = x/2
| odd x = (x*3) + 1
take 5 . iterate f $ 23
>inb4 iterate is a function in haskell
Code:f x | even x = x/2 | odd x = (x*3) + 1 take 5 . iterate f $ 23
lel (inb4 code doesn't work - I haven't run this).
But yes, I agree with you.
They have their place but I find map much more useful.
yeah, me too. I really like how you can use map to construct types and currying functions etc instead of just applying a function to a list of values.
I've only ever done java, js, html, php. Read of functional but never got into it
Question -- SuF, if you were to write a Haskell program to generate all permutations of a list, how would you do it? (This was an exercise I gave myself, but I'm trying to find better ways to do it because my way is slow -- takes ~ 3 seconds to generate all of them for 10 elements).