diff options
author | Hunky Jimpjorps <thechairman@thechairman.info> | 2022-11-26 01:43:33 -0500 |
---|---|---|
committer | Hunky Jimpjorps <thechairman@thechairman.info> | 2022-11-26 01:43:33 -0500 |
commit | feccf3f6f0a806b3317d1f399e3e8b42945c4f09 (patch) | |
tree | bf15ce045d1106c1b7f7de30c27540f40d0bf947 /2015/day-04/day-04.rkt | |
parent | 8b624fe7d2751337b1f16830cc9c041df73e99e7 (diff) | |
download | gleam_aoc-feccf3f6f0a806b3317d1f399e3e8b42945c4f09.tar.gz gleam_aoc-feccf3f6f0a806b3317d1f399e3e8b42945c4f09.zip |
using raco fmt, replacing missing dependency
Diffstat (limited to '2015/day-04/day-04.rkt')
-rw-r--r-- | 2015/day-04/day-04.rkt | 13 |
1 files changed, 4 insertions, 9 deletions
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)) |