adventofcode

rutledgepaulv 2021-01-24T14:31:49.008Z

@rutledgepaulv has left the channel

AC 2021-01-24T03:11:53.004600Z

I don’t have an answer for why your code ran slow, but I used the clojure reader to handle parsing day 18 --

(defn parse-expr
  [s]
  (read-string (str "(" s ")")))

> (parse-expr "((2 + 4 * 9) * (6 + 9 * 8 + 6) + 6) + 2 + 4 * 2")
(((2 + 4 * 9) * (6 + 9 * 8 + 6) + 6) + 2 + 4 * 2)