diff --git a/2024/day2/main.ml b/2024/day2/main.ml index 84e2680..152fbdd 100644 --- a/2024/day2/main.ml +++ b/2024/day2/main.ml @@ -27,7 +27,7 @@ let first data = || List.equal (fun a b -> a = b) l (List.rev sorted) in let rec adjacent = function - | x :: y :: tl -> if Int.abs (x - y) >= 3 then true else adjacent (y :: tl) + | x :: y :: tl -> if Int.abs (x - y) > 3 then true else adjacent (y :: tl) | _ :: [] | [] -> false in order l && adjacent l