ceylon.language.count.ceylon Maven / Gradle / Ivy
"A count of the number of `true` items in the given values.
Integer negatives = count { for (x in xs) x<0.0 };"
see (`function Iterable.count`)
tagged("Streams")
shared Integer count({Boolean*} values) {
variable value count=0;
for (val in values) {
if (val) {
count++;
}
}
return count;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy