Day 3 Lean Advent of Code solution:
https://github.com/mdr/aoc-2024/blob/main/Aoc2024/Day03/Solve.lean
I used regexes (but there was enough unpacking of matches that I suspect parser combinators would have been cleaner), and State monad to turn on/off instructions (probably overkill).

Comments