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

ceylon.language.any.ceylon Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy