val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> intThe lexicographic order supported by the provided order. There is no constraint on the relative lengths of the lists.
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> boolReturns
trueiff the given lists have the same length and content with respect to the given equality function.
val find_map : ('a -> 'b option) -> 'a t -> 'b optionfind_map f lreturns the first evaluation offthat returnsSome, or returns None if there is no such element.
val some_if_all_elements_are_some : 'a option t -> 'a t optionIf all elements of the given list are
Some _thenSome xsis returned with thexsbeing the contents of thoseSomes, with order preserved. Otherwise returnNone.
val map2_prefix : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t * 'b tlet r1, r2 = map2_prefix f l1 l2Ifl1is of length n andl2 = h2 @ t2with h2 of length n, r1 isList.map2 f l1 h1and r2 is t2.
val split_at : int -> 'a t -> 'a t * 'a tsplit_at n lreturns the pairbefore, afterwherebeforeis thenfirst elements oflandafterthe remaining ones. Iflhas less thannelements, raises Invalid_argument.
val is_prefix : equal:('a -> 'a -> bool) -> 'a list -> of_:'a list -> boolReturns
trueiff the given list, with respect to the given equality function on list members, is a prefix of the listof_.
type 'a longest_common_prefix_result = private {longest_common_prefix : 'a list;first_without_longest_common_prefix : 'a list;second_without_longest_common_prefix : 'a list;}
val find_and_chop_longest_common_prefix : equal:('a -> 'a -> bool) -> first:'a list -> second:'a list -> 'a longest_common_prefix_resultReturns the longest list that, with respect to the provided equality function, is a prefix of both of the given lists. The input lists, each with such longest common prefix removed, are also returned.