close files
This commit is contained in:
@@ -19,7 +19,8 @@
|
|||||||
(else
|
(else
|
||||||
(display "part 1: ")
|
(display "part 1: ")
|
||||||
(display (* x y))
|
(display (* x y))
|
||||||
(newline))))))
|
(newline)
|
||||||
|
(close-port file))))))
|
||||||
|
|
||||||
(let [(file (open-input-file "day-2.input"))]
|
(let [(file (open-input-file "day-2.input"))]
|
||||||
(let loop [(x 0) (y 0) (aim 0)]
|
(let loop [(x 0) (y 0) (aim 0)]
|
||||||
@@ -38,4 +39,5 @@
|
|||||||
(else
|
(else
|
||||||
(display "part 2: ")
|
(display "part 2: ")
|
||||||
(display (* x y))
|
(display (* x y))
|
||||||
(newline))))))
|
(newline)
|
||||||
|
(close-port file))))))
|
||||||
|
|||||||
Reference in New Issue
Block a user