advent-of-code/2021/day-10/part_one.ml
2021-12-10 19:22:00 +01:00

15 lines
208 B
OCaml

open Common
let () =
let path = Sys.argv.(1) in
read_file path
|> List.map (fun cs ->
match scores cs [] 0 with
| (e, _) -> e
)
|> List.fold_left (+) 0
|> print_int;
print_endline ""