add dev scafold and day 1 solution
This commit is contained in:
parent
49e961c0fd
commit
739b24dfbe
15 changed files with 2631 additions and 0 deletions
2
lib/dune
Normal file
2
lib/dune
Normal file
|
@ -0,0 +1,2 @@
|
|||
(library
|
||||
(name utils))
|
11
lib/utils.ml
Normal file
11
lib/utils.ml
Normal file
|
@ -0,0 +1,11 @@
|
|||
let read_file name =
|
||||
let ic = open_in name in
|
||||
let try_read () =
|
||||
try Some (input_line ic)
|
||||
with End_of_file -> None in
|
||||
let rec aux acc =
|
||||
match try_read () with
|
||||
| Some s -> aux (s::acc)
|
||||
| None -> close_in ic; acc in
|
||||
aux []
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue