From feccf3f6f0a806b3317d1f399e3e8b42945c4f09 Mon Sep 17 00:00:00 2001 From: Hunky Jimpjorps Date: Sat, 26 Nov 2022 01:43:33 -0500 Subject: using raco fmt, replacing missing dependency --- 2015/day-06/day-06.rkt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '2015/day-06') diff --git a/2015/day-06/day-06.rkt b/2015/day-06/day-06.rkt index 2cafa4e..d2eed08 100644 --- a/2015/day-06/day-06.rkt +++ b/2015/day-06/day-06.rkt @@ -10,7 +10,8 @@ (define instructions (for/list ([l (in-lines (open-day 6 2015))]) (~>> l - (regexp-match #px"(turn on|toggle|turn off) (\\d{1,3}),(\\d{1,3}) through (\\d{1,3}),(\\d{1,3})") + (regexp-match + #px"(turn on|toggle|turn off) (\\d{1,3}),(\\d{1,3}) through (\\d{1,3}),(\\d{1,3})") rest make-instruction))) @@ -30,8 +31,7 @@ (for ([y (inclusive-range (instruction-y1 inst) (instruction-y2 inst))]) (vector2d-modify! light-grid x y (using inst))))) -(define light-grid - (make-vector (* 1000 1000) #false)) +(define light-grid (make-vector (* 1000 1000) #false)) (for ([i (in-list instructions)]) (modify-light-grid i light-grid todo)) (vector-count identity light-grid) @@ -43,8 +43,7 @@ ['|turn off| (λ (x) (max 0 (sub1 x)))] ['|toggle| (curry + 2)])) -(define dimmable-grid - (make-vector (* 1000 1000) 0)) +(define dimmable-grid (make-vector (* 1000 1000) 0)) (for ([i (in-list instructions)]) (modify-light-grid i dimmable-grid todo-dimmer)) (apply + (vector->list dimmable-grid)) -- cgit v1.2.3