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

ceylon.language.every.ceylon Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
"Determines if every one of the given boolean values 
 (usually a comprehension) is `true`.
 
     Boolean allPositive = every { for (x in xs) x>0.0 };
 
 If there are no boolean values, return `true`."
see (`function any`, 
     `function Iterable.every`)
tagged("Streams")
shared Boolean every({Boolean*} values) {
    for (val in values) {
        if (!val) {
            return false;
        }
    }
    return true;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy