diff options
author | J.J <thechairman@thechairman.info> | 2023-12-01 14:31:01 -0500 |
---|---|---|
committer | J.J <thechairman@thechairman.info> | 2023-12-01 14:31:01 -0500 |
commit | a75aa83cefb27b7684afb8f3e74f4dc199f0dcff (patch) | |
tree | df546ccf4bfd45466801a1e7663a007ab8bb57ae | |
parent | b24b10d0dc6f5c58a85ab1b62334a14301e5e3bf (diff) | |
download | gleam_aoc-a75aa83cefb27b7684afb8f3e74f4dc199f0dcff.tar.gz gleam_aoc-a75aa83cefb27b7684afb8f3e74f4dc199f0dcff.zip |
fixing a small specification mistake
-rw-r--r-- | aoc2023-other/day-01/day-01.rkt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aoc2023-other/day-01/day-01.rkt b/aoc2023-other/day-01/day-01.rkt index b4fd688..b720f79 100644 --- a/aoc2023-other/day-01/day-01.rkt +++ b/aoc2023-other/day-01/day-01.rkt @@ -28,11 +28,11 @@ ;; part 1 -(define valid-for-part-1 (~> (range 0 10) (map ~a _))) +(define valid-for-part-1 (~> (range 1 10) (map ~a _))) (total-calibration calibration-values valid-for-part-1) ;; part 2 (define word-to-digit - (hash "one" 1 "two" 2 "three" 3 "four" 4 "five" 5 "six" 6 "seven" 7 "eight" 8 "nine" 9 "zero" 0)) + (hash "one" 1 "two" 2 "three" 3 "four" 4 "five" 5 "six" 6 "seven" 7 "eight" 8 "nine" 9)) (define valid-for-part-2 (append valid-for-part-1 (hash-keys word-to-digit))) (total-calibration calibration-values valid-for-part-2) |