From 61872e154b77378c203e4a9b179b4067cfe7f23b Mon Sep 17 00:00:00 2001 From: natile Date: Wed, 2 Oct 2002 16:28:43 +0000 Subject: [PATCH] Whithout List.hd error --- helm/ocaml/mathql_interpreter/mqint.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helm/ocaml/mathql_interpreter/mqint.ml b/helm/ocaml/mathql_interpreter/mqint.ml index 89c180abe..ba7d0713a 100644 --- a/helm/ocaml/mathql_interpreter/mqint.ml +++ b/helm/ocaml/mathql_interpreter/mqint.ml @@ -329,9 +329,12 @@ and exec_boole_exp c = function and exec_val_exp c = function | MathQL.Const x -> let ol = List.sort compare x in let rec edup = function + [] -> [] - | s::tl -> if s = (List.hd tl) then edup tl - else s::(edup tl) + | s::tl -> if tl <> [] then + if s = (List.hd tl) then edup tl + else s::(edup tl) + else s::[] in edup ol | MathQL.Record (rvar, vvar) -> List.assoc vvar (List.assoc rvar c.groups) -- 2.39.2