All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ceylon.language.count.ceylon Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
"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