I later wrote it in Python and list compression paid the most dividends for readability.
Originally in C, then Go (then Haskell, finally python, meaning to write parts of it in JAX)
Prioritized Grammar Enumeration for the curious