diff --git a/2017/d1.rkt b/2017/d1.rkt index 1ac7634..9819067 100644 --- a/2017/d1.rkt +++ b/2017/d1.rkt @@ -17,7 +17,7 @@ (define digits (for/list ([c (in-string (number->string num))]) (string->number (string c)))) (define offset (if (eq? offset-sig '★) -1 (/ (length digits) 2))) - (for/sum ([first (in-list digits)] - [second (in-list (shift-cycle digits offset))] - #:when (= first second)) - first)) \ No newline at end of file + (for/sum ([digit (in-list digits)] + [other-digit (in-list (shift-cycle digits offset))] + #:when (= digit other-digit)) + digit)) \ No newline at end of file