Skip to content

Commit

Permalink
Move run2023 up top
Browse files Browse the repository at this point in the history
  • Loading branch information
drewolson committed Nov 28, 2023
1 parent 34a178a commit 03dbd90
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/runner/runner.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
let run2023 day part input =
match day, part with
| 1, 1 -> Printf.printf "%i\n" @@ Year2023.Day01.part1 input
| 1, 2 -> Printf.printf "%i\n" @@ Year2023.Day01.part2 input
| day, part -> failwith @@ Printf.sprintf "Unknown day %i and part %i" day part
;;

let run2022 day part input =
match day, part with
| 1, 1 -> Printf.printf "%i\n" @@ Year2022.Day01.part1 input
Expand Down Expand Up @@ -25,13 +32,6 @@ let run2022 day part input =
| day, part -> failwith @@ Printf.sprintf "Unknown day %i and part %i" day part
;;

let run2023 day part input =
match day, part with
| 1, 1 -> Printf.printf "%i\n" @@ Year2023.Day01.part1 input
| 1, 2 -> Printf.printf "%i\n" @@ Year2023.Day01.part2 input
| day, part -> failwith @@ Printf.sprintf "Unknown day %i and part %i" day part
;;

let run year day part =
let path = Printf.sprintf "data/%i/day%02i.txt" year day in
let input = In_channel.read_all path in
Expand Down

0 comments on commit 03dbd90

Please sign in to comment.