From 5b7eafd0f00a16d78f99a27f5c7d5a0de77dc7e6 Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Wed, 21 Jul 2010 09:46:51 +0200 Subject: Imported Upstream snapshot 8.3~beta0+13298 --- contrib/interface/paths.ml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 contrib/interface/paths.ml (limited to 'contrib/interface/paths.ml') diff --git a/contrib/interface/paths.ml b/contrib/interface/paths.ml deleted file mode 100644 index a157ca92..00000000 --- a/contrib/interface/paths.ml +++ /dev/null @@ -1,26 +0,0 @@ -let int_list_to_string s l = - List.fold_left - (fun s -> (fun v -> s ^ " " ^ (string_of_int v))) - s - l;; - -(* Given two paths, this function returns the longest common prefix and the - two suffixes. *) -let rec decompose_path - : (int list * int list) -> (int list * int list * int list) = - function - (a::l,b::m) when a = b -> - let (c,p1,p2) = decompose_path (l,m) in - (a::c,p1,p2) - | p1,p2 -> [], p1, p2;; - -let rec is_prefix p1 p2 = match p1,p2 with - [], _ -> true -| a::tl1, b::tl2 when a = b -> is_prefix tl1 tl2 -| _ -> false;; - -let rec lex_smaller p1 p2 = match p1,p2 with - [], _ -> true -| a::tl1, b::tl2 when a < b -> true -| a::tl1, b::tl2 when a = b -> lex_smaller tl1 tl2 -| _ -> false;; -- cgit v1.2.3