From 379b3d5d4b56270ff328844697f0a5586cad04fa Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 6 Jan 2016 12:19:22 -0800 Subject: [PATCH] typo --- day24.rkt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/day24.rkt b/day24.rkt index b1c1695..c903055 100644 --- a/day24.rkt +++ b/day24.rkt @@ -52,7 +52,7 @@ After that, we just need to write a function that will test whether a given grou (define (remove-group group packages) (filter (λ(p) (not (member p group))) packages)) - (define (find-two-group-solution group packages) + (define (has-solution? group packages) (define target-weight (weight group)) (define remaining-packages (remove-group group packages)) (for/first ([len (in-range (length remaining-packages))] @@ -65,7 +65,6 @@ After that, we just need to write a function that will test whether a given grou @chunk[ - (require sugar/debug) (define (find-three-group-solution all-packages target-weight) (for*/first ([len (in-range (length all-packages))] @@ -73,7 +72,7 @@ After that, we just need to write a function that will test whether a given grou (sort (groups all-packages len target-weight) #:key quantum-entanglement <))] - #:when (find-two-group-solution group all-packages)) + #:when (has-solution? group all-packages)) (quantum-entanglement group))) (define (q1 input-str)