day 1: bikeshed
This commit is contained in:
parent
8b342f6d7b
commit
e2fee2f19a
3
1.rkt
3
1.rkt
|
@ -8,8 +8,7 @@
|
|||
(apply max (map #{apply + %} input)))
|
||||
|
||||
(define (part2 input)
|
||||
(match-define (list* a b c _) (sort (map #{apply + %} input) >))
|
||||
(+ a b c))
|
||||
(apply + (~> (map #{apply + %} input) (sort >) (take 3))))
|
||||
|
||||
(define (parse fname)
|
||||
(define elves (string-split (file->string fname) "\n\n"))
|
||||
|
|
Loading…
Reference in New Issue