Implementations here are from batteries and slightly modified. They are tuned for performance and not necessarily the same style non-library code should be written.
val existsi : (int ->'a-> bool)->'b array-> bool
val for_alli : (int ->'a-> bool)->'b array-> bool
val count_matchingi : (int ->'a-> bool)->'b array-> int