X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fmathql_interpreter%2Fsub.ml;h=e59bf049d1e25fd6c05e63495f8dac59fd2b1dcb;hb=6cd9c31edf69f619789a9802e840fbb61f4b6b40;hp=17804c75412420393dad856322272262583d046b;hpb=6802617e5354dc6a854ac18c70f3c7fe17ab21f1;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/sub.ml b/helm/ocaml/mathql_interpreter/sub.ml index 17804c754..e59bf049d 100644 --- a/helm/ocaml/mathql_interpreter/sub.ml +++ b/helm/ocaml/mathql_interpreter/sub.ml @@ -26,7 +26,9 @@ let rec sub_ex v1 v2 = match v1,v2 with - [],_ + [],_ -> true | _,[] -> false - | s::tl,l -> if (List.mem s l) then sub_ex tl l - else false + | s1::_, s2::_ when s1 < s2 -> false + | s1::_, s2::tl2 when s2 < s1 -> sub_ex v1 tl2 + | s1::tl1, s2::tl2 -> sub_ex tl1 tl2 +;;