diff options
author | William Carroll <wpcarro@gmail.com> | 2020-07-01T09·42+0100 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-07-01T09·42+0100 |
commit | ee1aeee5f8536c35fb9f1580174facd33698ad50 (patch) | |
tree | 22a001789253ae867845e72631ce20553d949f68 /go | |
parent | c4fe3c92c7e18a58630edc2a5d9a334075af985f (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