mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 13:03:19 -09:00
format
This commit is contained in:
parent
3fb9c68d6d
commit
fb64df5db5
@ -12,14 +12,14 @@
|
|||||||
(re-find #"\d" (string/reverse %)))))
|
(re-find #"\d" (string/reverse %)))))
|
||||||
(reduce +))
|
(reduce +))
|
||||||
|
|
||||||
(def numeric-value-map {"one" 1,
|
(def numeric-value-map {"one" 1
|
||||||
"two" 2,
|
"two" 2
|
||||||
"three" 3,
|
"three" 3
|
||||||
"four" 4,
|
"four" 4
|
||||||
"five" 5,
|
"five" 5
|
||||||
"six" 6,
|
"six" 6
|
||||||
"seven" 7,
|
"seven" 7
|
||||||
"eight" 8,
|
"eight" 8
|
||||||
"nine" 9})
|
"nine" 9})
|
||||||
(defn numeric-value [s]
|
(defn numeric-value [s]
|
||||||
(or (numeric-value-map s) s))
|
(or (numeric-value-map s) s))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user