Matthew gave me some good feedback on the initial commit. He suggested that the use of a macro could simplify things by doing the counting and label gathering together before even hitting
root. Macros are one of the coolest and most powerful features of lisps. There’s a bit more to Racket macros than the Common Lisp equivalent with which I’m familiar; this change has allowed me to investigate Racket macros a bit more but I’ll admit I’m not grokking them fully yet1.