test pass

This commit is contained in:
Mylloon 2024-12-04 22:39:43 +01:00
parent 99c05dbcc2
commit df495d5568
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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