let any_overlap tl = let tl = List.sort tl ~cmp:(fun u v -> Int.compare u.lo v.lo) in let rec loop tl = match tl with | [] | _::[] -> false | u::v::tl -> v.lo <= u.hi || loop (v::tl) in loop tl