Commit graph

7 commits

Author SHA1 Message Date
William Carroll
ee1aeee5f8 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) }
```
2020-07-01 10:42:57 +01:00
William Carroll
c4fe3c92c7 Create a .ghci for this directory
I would've created on at $HOME/.ghci, but I don't need that yet, and I didn't
want to bother with home-manager.
2020-07-01 10:38:56 +01:00
William Carroll
d820898de5 Complete exercises from Traversable chapter
I feel much more comfortable using `traverse` and `sequenceA`. I even used both
of them in the Haskell program that I wrote at work to export a trix.
2020-07-01 10:37:54 +01:00
William Carroll
362a31166d Create Nix shell for Haskell scratchpad
Helps me run my chapter exercises.
2020-06-18 11:08:55 +01:00
William Carroll
a981bb0d4a Complete the Monad chapter
From "Haskell Programming from First Principles"...

I have completed all of the exercises in the book thus far, but I only recently
dedicated a Haskell module for each chapter. Previously I created ad hoc modules
per exercise, per chapter... it was chaotic.
2020-06-18 11:07:55 +01:00
William Carroll
71e79f5f5d Complete exercises from Applicative chapter
From "Haskell Programming from First Principles"...
2020-06-18 11:07:03 +01:00
William Carroll
406764f552 Complete exercises from Foldable chapter
I'm creating Haskell modules to host my attempts and solutions for the exercises
defined in each chapter of "Haskell Programming From First Principles".
2020-06-18 11:05:49 +01:00