It's beautiful how State is just Reader that returns a tuple of (a, r) instead
of just a, allowing you to modify the environment (i.e. state).
```haskell
newtype Reader r a = Reader { runReader :: r -> a }
newtype State s a = State { runState :: s -> (a, s) }
```
|
||
|---|---|---|
| .. | ||
| crack_the_coding_interview | ||
| data_structures_and_algorithms | ||
| deepmind | ||
| groceries | ||
| haskell-programming-from-first-principles | ||
| README.md | ||
Scratch
The purpose of the scratch directory is to host practice exercises. Practice
encompasses things like working on data structures and algorithms problems for
upcoming coding interviews or general aptitude as well as writing code snippets
to help me learn a new programming language or understand an unfamiliar concept.