From a75aa83cefb27b7684afb8f3e74f4dc199f0dcff Mon Sep 17 00:00:00 2001 From: "J.J" Date: Fri, 1 Dec 2023 14:31:01 -0500 Subject: fixing a small specification mistake --- aoc2023-other/day-01/day-01.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aoc2023-other/day-01/day-01.rkt') 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) -- cgit v1.2.3