diff --git a/src/08.rkt b/src/08.rkt index a6e4ae6..eaff747 100644 --- a/src/08.rkt +++ b/src/08.rkt @@ -22,32 +22,24 @@ (filter #{= (length %) segments} patterns)) (define-values (one four seven eight) (values (digit 2) (digit 4) (digit 3) (digit 7))) - (define-values (fives sixes) - (values (digits 5) (digits 6))) - (define top - (set-first (set-subtract seven one))) - (define bottom - (set-first (set-subtract (apply set-intersect fives) four `(,top)))) - (define middle - (set-first (set-subtract (apply set-intersect fives) `(,top ,bottom)))) - (define top-left - (set-first (set-subtract four one `(,middle)))) - (define bottom-right - (set-first (set-subtract (apply set-intersect sixes) `(,top ,bottom ,top-left)))) - (define top-right - (set-first (set-remove one bottom-right))) - (define bottom-left - (set-first (set-subtract eight `(,top ,bottom ,top-left ,top-right ,bottom-right ,middle)))) - (hash (sort one char