Implemented using Racket.