|
|
|
|
|
by baguasquirrel
6199 days ago
|
|
I'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. |
|
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.)