Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
demiazz committed Nov 26, 2024
1 parent 595a148 commit dccb175
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/solver/registry.ml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ let all_years map =
IntSet.to_list unique_years

let all_days ~year map =
let filter_map key =
match key with
let filter_map = function
| current_year, day, _ when current_year == year -> Some day
| _ -> None
in
Expand Down
4 changes: 1 addition & 3 deletions lib/year_2015/day_01.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
let parse input =
let process char =
match char with '(' -> Some 1 | ')' -> Some (-1) | _ -> None
in
let process = function '(' -> Some 1 | ')' -> Some (-1) | _ -> None in
input |> Parse.chars_of process

let part_one input = input |> parse |> Seq.fold_left ( + ) 0 |> string_of_int
Expand Down
3 changes: 1 addition & 2 deletions lib/year_2015/day_03.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module Point_set = Set.Make (Geometry.Int_point_2d)

let parse input =
let to_point char =
match char with
let to_point = function
| '^' -> Some (0, 1)
| 'v' -> Some (0, -1)
| '>' -> Some (1, 0)
Expand Down

0 comments on commit dccb175

Please sign in to comment.