about summary refs log tree commit diff
path: root/go
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-01T09·42+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-01T09·42+0100
commitee1aeee5f8536c35fb9f1580174facd33698ad50 (patch)
tree22a001789253ae867845e72631ce20553d949f68 /go
parentc4fe3c92c7e18a58630edc2a5d9a334075af985f (diff)
Complete exercises for Reader and State chapters
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) }
```
Diffstat (limited to 'go')
0 files changed, 0 insertions, 0 deletions