1
let int_list_to_string s l =
3
(fun s -> (fun v -> s ^ " " ^ (string_of_int v)))
7
(* Given two paths, this function returns the longest common prefix and the
10
: (int list * int list) -> (int list * int list * int list) =
12
(a::l,b::m) when a = b ->
13
let (c,p1,p2) = decompose_path (l,m) in
15
| p1,p2 -> [], p1, p2;;
17
let rec is_prefix p1 p2 = match p1,p2 with
19
| a::tl1, b::tl2 when a = b -> is_prefix tl1 tl2
22
let rec lex_smaller p1 p2 = match p1,p2 with
24
| a::tl1, b::tl2 when a < b -> true
25
| a::tl1, b::tl2 when a = b -> lex_smaller tl1 tl2