New issue 21 by ygrekher...@gmail.com: Array.exists is slower than
List.exists
http://code.google.com/p/ocaml-extlib/issues/detail?id=21
Allocates too much (ocamlopt problem?), the implementation below is
noticeably faster :
let array_exists p xs =
try
for i = 0 to Array.length xs - 1 do
if p xs.(i) then raise Exit
done; false
with Exit -> true