8 ms·
Haskell: http://learnyouahaskell.com/ http://learnyouahaskell.com/ http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/
by wilkes 17y ago
Haskell:
http://learnyouahaskell.com/ http://learnyouahaskell.com/
http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/
- johngunderman 17y agoI would also suggest http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H... as it not only teaches Haskell, but also Scheme (as the tutorial covers the construction of a Scheme interpreter)
- caffeine 17y agoNotes about Haskell: It's strange, but Haskell is more difficult to read than write. This is because most code on e.g. Hackage uses some very complicated gymnastics involving Applicative, Arrows, or whatever. So it's hard to learn from other people's programs. Also, a warning: learning Haskell might screw with your ability to write code in other languages! It took me two weeks before I stopped making every line of Python a lambda.
- baguasquirrel 17y agoI'm really curious to see how other people are progressing through the learning process for Haskell (and other HM-based functional languages). I rarely use lambdas, and I feel that Haskell is much easier to read than to write. Clearly there's something different about our approaches. I learned SML back in school, picked up OCaml about 3 years ago, and picking up Haskell was still a bit of a trip.
- samstokes 17y agoI also find I use lambdas less in Haskell than in other languages. I think it's because in Haskell, constructs like partial application, function composition or lifting are concise and natural to express, and those constructs cover most common use cases for an anonymous function. I think map (find needle) haystacks is clearer (as well as shorter!) than map (\haystack -> find needle haystack) haystacks In most other languages things like partial application are a pain to express, so a lambda is an easier way out. (Now I'm imagining the six lines of Java I'd have to write to achieve the same effect as those four words of Haskell, and trying not to giggle. Functional style is addictive.)
- caffeine 17y agoSorry - I meant that it makes me use lambdas in Python (you're right, I don't use many lambdas in Haskell either). I find myself using them in Python everywhere as a substitute for currying and/or laziness, e.g.: def f(a,b): ... # do stuff def g(a,b): ... # do other stuff meths = {'use f':f, 'use g':g} a = calculate_a() m = pick_a_method() x = do_cool_thing(data,lambda b: meths['m'](a,b))
- miloshh 17y agoDefinitely Haskell. May I add one more resource for learning it that worked great for me, the official "Gentle Introduction to Haskell": http://www.haskell.org/tutorial/ http://www.haskell.org/tutorial/ For those already proficient with programming that just wnat to pick up Haskell, it's ideal. Then I would suggest an exercise that involves manipulating abstract syntax, for example parsing and interpreting a little language. ("Build yourself a Scheme..." might be good though I didn't read it myself.) This is where the language really shines, and you don't need any of the recently popular trickery like arrows or GADTs.