-let rec union_list t l1 l2 =
- match l1,l2 with
- | [],l2 -> l2
- | l1, [] -> l1
- | h1::ll1, h2::ll2 -> if (comp_node t h2 h1) then h2 :: (union_list t l1 ll2)
- else if (comp_node t h1 h2) then h1::(union_list t ll1 l2)
- else h1 ::(union_list t ll1 ll2)
-
-let rec inter_list t l1 l2 =
- match l1,l2 with
- | [],l2 -> []
- | l1, [] -> []
- | h1::ll1, h2::ll2 -> if (comp_node t h1 h2) then inter_list t ll1 l2
- else if (comp_node t h2 h1) then inter_list t l1 ll2
- else h1 :: (inter_list t ll1 ll2)
-
-let rec diff_list t l1 l2 =
- match l1,l2 with
- | [],l2 -> []
- | l1, [] -> l1
- | h1::ll1, h2::ll2 -> if (comp_node t h1 h2) then h1::(diff_list t ll1 l2)
- else if (comp_node t h2 h1) then h2 :: (diff_list t l1 ll2)
- else diff_list t ll1 ll2