Exercise solutions for How to Design Programs 2e
Find a file
2026-04-22 20:07:19 +01:00
solutions 🔨 Fixed typo; tested removal of off-screen missiles; bound aliens to screen 2026-04-22 20:07:19 +01:00
.gitignore Added exercises 001-093 2025-09-23 21:51:28 +01:00
README.md Update README.md 2026-04-02 19:39:30 +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/