Exercise solutions for How to Design Programs 2e
  • Racket 99.6%
  • Shell 0.4%
Find a file
2026-06-05 07:55:50 +01:00
data Fix tests failing in new environment 2026-06-02 09:23:28 +01:00
hooks Add commit-msg hook 2026-05-15 19:44:35 +01:00
solutions Reformat check-error for readability 2026-06-05 07:55:50 +01:00
.gitignore Added exercises 001-093 2025-09-23 21:51:28 +01:00
README.md Removed trailing whitespace 2026-05-12 14:34:10 +01:00

HtDP

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

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 -xqj 8 solutions/