adambard/learnxinyminutes-docs — pull request #62 by egonSchiele (2013-06-30 17:04:18+00:00)
Title: Fixing gripes about Haskell

Here are my comments on the issues:

- indexing into a list: FIXED
- error on map: FIXED
- double: FIXED
- make type signature into comment: FIXED
- how to write functions: FIXED, I made a small note when a function first appears.
- no mention of lazy evaluation: FIXED
- no mention of purity: FIXED
- an if construct is not a control flow statement, but an expression, and indentation does not matter at all (except for the general layout rules and do blocks): FIXED. Indentation *is* important.
strings cannot be "added" in Haskell (unless you import Acme.PHP); they can be concatenated: FIXED
strings cannot be "treated like lists of characters": they are lists of characters (which is also why you'd typically use Texts instead in most cases): FIXED
- the fib function is horribly inefficient and a bad example: This is a classic example. No need to complicate it by talking efficiency yet.
no mention of the fact that functions are always fully curried (i.e., a function never takes more than one argument; if you need more, you return another function): I've mentioned currying, I don't think it needs any more for a beginner tutorial
no explanation of type inference and how it causes types and type constraints to "bubble up" in the call hierarchy: Same as above.
the reason Haskell doesn't have loops is not "because it uses recursion instead", but because it is pure, and for an imperative free-form loop, you need mutable state: A loop doesn't need to have mutable state to be a loop.
- Haskell does have more specialized "looping" constructs...: Again, this is a beginner tutorial so I'm avoiding monads.