about summary refs log tree commit diff
path: root/scratch/haskell-programming-from-first-principles
AgeCommit message (Collapse)AuthorFilesLines
2020-07-17 Partially complete IO chapter exercisesWilliam Carroll1-0/+35
Inconveniently, I do not have the cipher code that I wrote from a previous chapter, and I'm not eager to reimplement it. TODO - Implement encrypt - Implement decrypt - Read all characters from STDIN
2020-07-17 Partially complete the "Basic Libraries" chapter exercisesWilliam Carroll1-0/+60
I was instructed to benchmark these functions, but I couldn't get the benchmarking library to run using Nix -- although I'm *sure* it's possible. Unfortunately the book recommends using `stack`, which I couldn't reproduce.
2020-07-14 Complete exercises for "Non-Strictness" chapterWilliam Carroll1-0/+6
I completed most of the exercises for this enlightening chapter in ghci.
2020-07-12 Finish exercises for Monad Transformer chapterWilliam Carroll1-6/+110
I expect to look back on this code and cringe, but... it compiles!
2020-07-12 Partially complete Monad Transformer exercisesWilliam Carroll1-0/+79
Write Functor, Applicative, Monad instances for: - MaybeT - EitherT - ReaderT
2020-07-11 Partially complete some of the exercises for Composing TypesWilliam Carroll1-0/+75
I believe there are two exercises sets in the "Composing Types" chapter. Here are *some* of my answers so far... I'm having trouble implementing Foldable for Compose. I was able to implement a version of it by adding the (Functor f) constraint to the instance signature, but I think I cheated. I will revisit these problems as well as the earlier exercises later.
2020-07-01 Complete exercises for Reader and State chaptersWilliam Carroll2-0/+242
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 Create a .ghci for this directoryWilliam Carroll1-0/+1
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 Complete exercises from Traversable chapterWilliam Carroll1-0/+131
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-06-18 Create Nix shell for Haskell scratchpadWilliam Carroll1-0/+10
Helps me run my chapter exercises.
2020-06-18 Complete the Monad chapterWilliam Carroll1-0/+178
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 Complete exercises from Applicative chapterWilliam Carroll1-0/+213
From "Haskell Programming from First Principles"...
2020-06-18 Complete exercises from Foldable chapterWilliam Carroll1-0/+107
I'm creating Haskell modules to host my attempts and solutions for the exercises defined in each chapter of "Haskell Programming From First Principles".