diff options
author | barras <barras@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-11-24 14:09:46 +0000 |
---|---|---|
committer | barras <barras@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-11-24 14:09:46 +0000 |
commit | 0f22ef93c84513d01964eedbcbebf9763d641c30 (patch) | |
tree | f400cee9bc46a6cefdb112dd25119c9249711b09 /lib | |
parent | f9e72471a81f3b5c22b3d26d434481adf752d3bf (diff) |
eventually fixing r11612
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11626 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.ml | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/util.ml b/lib/util.ml index 639d2bf00..e18a75152 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -1145,32 +1145,17 @@ let array_fold_map2' f v1 v2 e = in (v',!e') -(* N.logN *) let array_distinct v = let visited = Hashtbl.create 23 in try Array.iter (fun x -> - if Hashtbl.mem visited h then raise Exit - else Hashtbl.add visited h h) + if Hashtbl.mem visited x then raise Exit + else Hashtbl.add visited x x) v; true with Exit -> false - -(* quadratic *) -(*let array_distinct v = - try - for i=0 to Array.length v-1 do - for j=i+1 to Array.length v-1 do - if v.(i)=v.(j) then raise Exit - done - done; - true - with Exit -> - false -*) - let array_union_map f a acc = Array.fold_left (fun x y -> f y x) |