Commit 1268099c authored by POTTIER Francois's avatar POTTIER Francois

Removed [General.compare] (lexicographic ordering on lists).

parent 89f13e9e
......@@ -43,19 +43,6 @@ let uniq cmp xs =
let weed cmp xs =
uniq cmp (List.sort cmp xs)
(* TEMPORARY dead code, if we remove [compare_words] *)
let rec compare cmp xs ys =
match xs, ys with
| [], [] ->
0
| [], _ :: _ ->
-1
| _ :: _, [] ->
1
| x :: xs, y :: ys ->
let c = cmp x y in
if c <> 0 then c else compare cmp xs ys
(* --------------------------------------------------------------------------- *)
(* Streams. *)
......
......@@ -26,11 +26,6 @@ val uniq: ('a -> 'a -> int) -> 'a list -> 'a list
val weed: ('a -> 'a -> int) -> 'a list -> 'a list
(* If [cmp] is an ordering on elements, then [compare cmp] is the
lexicographic ordering on lists. *)
val compare: ('a -> 'a -> int) -> 'a list -> 'a list -> int
(* --------------------------------------------------------------------------- *)
(* A stream is a list whose elements are produced on demand. *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment