>>107987497
(ns aoc2025.day1.combined
(:require [clojure.string :as str]))
(defn turn-dial [dial rotation]
(mod (+ dial rotation)
100))
(defn count-zeroes [[dial zeroes] rotation]
(let [sign (compare rotation 0)
d (+ dial sign)
r (- rotation sign)]
(cond
(zero? rotation) [dial zeroes]
(#{0 100} d) (recur [0 (inc zeroes)] r)
Comment too long. Click here to view the full text.