2 thoughts—
- Idiomatic Racket puts test code in a test submodule. So
(module+ test …), and you can(require rackunit)inside that module, define your examples and checks there, etc. - You probably already know this, but time is hard. HTDP's version may be convenient for an exercise, but don't use anything like it for production code
in particular, leap seconds will screw up the calculation, and there's probably other things I'm missing.