day 1: bikeshed

This commit is contained in:
xenia 2022-12-01 00:31:48 -05:00
parent 8b342f6d7b
commit e2fee2f19a
1 changed files with 1 additions and 2 deletions

3
1.rkt
View File

@ -8,8 +8,7 @@
(apply max (map #{apply + %} input))) (apply max (map #{apply + %} input)))
(define (part2 input) (define (part2 input)
(match-define (list* a b c _) (sort (map #{apply + %} input) >)) (apply + (~> (map #{apply + %} input) (sort >) (take 3))))
(+ a b c))
(define (parse fname) (define (parse fname)
(define elves (string-split (file->string fname) "\n\n")) (define elves (string-split (file->string fname) "\n\n"))