Initial commit
This commit is contained in:
commit
f242d2b0df
420 changed files with 62521 additions and 0 deletions
13
2021/day01/day01.scm
Normal file
13
2021/day01/day01.scm
Normal file
|
@ -0,0 +1,13 @@
|
|||
(import (chicken io) srfi-1)
|
||||
|
||||
(define (read-input #!optional (port (current-input-port)))
|
||||
(map string->number
|
||||
(read-lines port)))
|
||||
|
||||
(define (part1 l) (count < l (cdr l)))
|
||||
|
||||
(define (part2 l) (count < l (cdddr l)))
|
||||
|
||||
(let ((in (read-input)))
|
||||
(print (part1 in))
|
||||
(print (part2 in)))
|
Loading…
Add table
Add a link
Reference in a new issue