Exercise solutions for How to Design Programs 2e
  • Racket 99.6%
  • Shell 0.4%
Find a file
2026-09-17 19:14:27 +01:00
data Fix tests failing in new environment 2026-06-02 09:23:28 +01:00
hooks Make pre-push check #lang and required modules 2026-09-17 19:14:16 +01:00
solutions Fix test failing from changes to hooks dir 2026-09-17 19:14:27 +01:00
.gitignore Add a compilation step 2026-07-16 08:35:28 +01:00
README.md Reword README 2026-09-16 18:38:17 +00:00

HtDP

Here are my exercise solutions for the second edition of How to Design Programs.

This is a second attempt, restarting from the beginning after the last attempt lay dormant for a year.

I've deviated from the book a little and use #lang racket instead of the teaching languages for minor quality of life changes, such as importing and exporting code snippets between exercises using provide and require. I also trialled using Typed Racket roughly a third of the way in, but this was short-lived.

Testing

I started this second attempt separating my solutions from their tests so that the solutions themselves weren't so cluttered. However, I have since decided to move the tests back alongside the solutions, now contained in submodules below the relevant functions.

Additionally, I use rackunit instead of test-engine/racket-tests. Using rackunit, I can easily run every test submodule to better find failures:

raco test -qj 8 solutions/