Rename functions to be more idiomatic.
This commit is contained in:
@@ -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) ]
|
||||
|
Reference in New Issue
Block a user