Exercises for the book - The Little Typer
Exercises were lovingly curated by Paul Cadman
- Install Racket
- Open DrRacket
- File -> Install Package
- In the package name field, type pie and then click the
Install
button. - To use Pie, begin a file with
#lang pie
in DrRacket. - Testing Pie Programs
-
replace
in Chapter 9 was quite hard for me to grasp, but I wasn't the only one. Andrew Helwer has written up a blog post as a preamble to Chapter 9, that I would recommend reading before reading Chapter 9. I also finally came up with a way to understand and use it and it seems like everyone in the study group came up with their own unique way. See discussion in the Google Group or a print out of the discussion if you don't have permission. -
Exercise 10.2 and 10.3 might be easier after reading Chapter 12.
-
rec-Nat
andrec-List
are paramorphisms, see Nat.hs and List.hs. Exercises from Chapter 3, 4 and 5 were rewritten using these implementations.For more information on recursion schemes, see An introduction to recursion schemes - Patrick Thomson
-
same
is a Functor andcong
is fmap, see Equal.hs