Rename functions to be more idiomatic.

This commit is contained in:
2024-12-03 08:53:02 +00:00
parent 5d99f413de
commit 2ee7f6a3d3
5 changed files with 13 additions and 14 deletions

View File

@@ -15,12 +15,11 @@ let is_safe_dampened lst =
in
impl [] lst
let nums_from_file fname =
Aoc.strings_from_file fname |> List.map Aoc.nums_from_string
let ints_of_file fname =
Aoc.strings_of_file fname |> List.map Aoc.ints_of_string
let day2402a lsts = List.filter is_safe lsts |> List.length
let day2402b lsts = List.filter is_safe_dampened lsts |> List.length
let _ =
Aoc.main nums_from_file
[ (string_of_int, day2402a); (string_of_int, day2402b) ]
Aoc.main ints_of_file [ (string_of_int, day2402a); (string_of_int, day2402b) ]