Build the segment tree! Commit this quick before something bad happens ...
[virt-df.git] / lib / diskimage_utils.mli
index 6f813fe..9eccf64 100644 (file)
@@ -144,6 +144,14 @@ val canonical_uuid : string -> string
 val group_by : ?cmp:('a -> 'a -> int) -> ('a * 'b) list -> ('a * 'b list) list
 (** Group a sorted list of pairs by the first element of the pair. *)
 
+val sort_uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list
+(** [sort_uniq xs] returns the list [xs], sorted and with all duplicate
+    elements removed. *)
+
+val uniq : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list
+(** [uniq xs] removes adjacent duplicate elements from a list, like
+    the Unix uniq(1) command. *)
+
 val range : int -> int -> int list
 (** [range a b] returns the list of integers [a <= i < b].
     If [a >= b] then the empty list is returned.