u/Iceland_jackin r/haskell • Recommends
On “What did you wish you had known about in the first two weeks of learning Haskell?”
…t for mutation/arrays.
* Do not dismiss simple things, it doesn't have to be complicated to be useful.
data Bool = False | True
data Maybe a = Nothing | Just a
data Either a b = Left a | Right b
data Ordering = LT | EQ | GT
(.. what Edward Kmett refers to as ‘dumb reusable data’ ^^[**YouTube**](link to this video
id :: a -> a
id x = x
const :: a -> b -> a
const x _ = x
* Write instances by hand, write them many times and make sure you understand the **un**intuitive ones. You know `fmap @[]` is the same as `map` (the `@` uses *type applications*) but `fmap @((->) _) = (.)` may surprise you. Same with (see link to this video if…