diff --git a/2023/src/day01.clj b/2023/src/day01.clj index 40e8692..6c31793 100644 --- a/2023/src/day01.clj +++ b/2023/src/day01.clj @@ -12,14 +12,14 @@ (re-find #"\d" (string/reverse %))))) (reduce +)) -(def numeric-value-map {"one" 1, - "two" 2, - "three" 3, - "four" 4, - "five" 5, - "six" 6, - "seven" 7, - "eight" 8, +(def numeric-value-map {"one" 1 + "two" 2 + "three" 3 + "four" 4 + "five" 5 + "six" 6 + "seven" 7 + "eight" 8 "nine" 9}) (defn numeric-value [s] (or (numeric-value-map s) s))