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-04/day-04.rkt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to '2015/day-04') diff --git a/2015/day-04/day-04.rkt b/2015/day-04/day-04.rkt index 4008b92..2c16043 100644 --- a/2015/day-04/day-04.rkt +++ b/2015/day-04/day-04.rkt @@ -3,21 +3,16 @@ threading file/md5) -(define secret-key (~> (open-day 4 2015) - port->string - string-trim)) +(define secret-key (~> (open-day 4 2015) port->string string-trim)) (define (find-n-zeroes n) (for/first ([i (in-naturals)] - #:when (~>> i - (~a secret-key) - md5 - bytes->string/utf-8 - (string-prefix? _ (make-string n #\0)))) + #:when + (~>> i (~a secret-key) md5 bytes->string/utf-8 (string-prefix? _ (make-string n #\0)))) i)) ;; part 1 (time (find-n-zeroes 5)) ;; part 2 -(time (find-n-zeroes 6)) \ No newline at end of file +(time (find-n-zeroes 6)) -- cgit v1.2.3