indexWhereFloatCount function
Index of the first entry in floatCounts for which test returns true, or
-1 if none match.
Implementation
int indexWhereFloatCount(
List<int> floatCounts,
bool Function(int floats) test,
) {
for (int i = 0; i < floatCounts.length; i++) {
if (test(floatCounts[i])) return i;
}
return -1;
}