diff --git a/src/util/ListUtil.re b/src/util/ListUtil.re index 39a2d5994e..8481df4f0a 100644 --- a/src/util/ListUtil.re +++ b/src/util/ListUtil.re @@ -9,9 +9,6 @@ let dedup_f = (f, xs) => let dedup = xs => dedup_f((==), xs); -let are_duplicates = xs => - List.length(List.sort_uniq(compare, xs)) == List.length(xs); - /** Groups elements of a list by a specified key. diff --git a/test/Test_ListUtil.re b/test/Test_ListUtil.re index 017c2e6d96..9abfca4f07 100644 --- a/test/Test_ListUtil.re +++ b/test/Test_ListUtil.re @@ -46,22 +46,6 @@ let tests = ( ); // TODO: Interesting the order here is messed up because of fold_right }, ), - test_case( - "are_duplicates has duplicates", - `Quick, - () => { - let xs = [1, 2, 3, 2]; - check(bool, "Returns false", false, ListUtil.are_duplicates(xs)); // TODO: Interesting the order here is messed up because of fold_right - }, - ), - test_case( - "are_duplicates has no duplicates", - `Quick, - () => { - let xs = [1, 2, 3]; - check(bool, "Returns true", true, ListUtil.are_duplicates(xs)); - }, - ), test_case( "group_by with constant function preserves list", `Quick,