Across Quantifiers
For the assertion "for all items in my_set, is_something must be true":
require
all_are_something: across my_set as ic all ic.item.is_something end
The key syntax is across ... all ... end (universal quantifier). There's also some for existential:
-- At least one is_something
some_is_something: across my_set as ic some ic.item.is_something end
Google tips for finding this:
- Search: "Eiffel" "across" "all" quantifier (quotes force exact matches)
- Better: site:
eiffel.org across quantifier
- ECMA-367 spec section 8.24.8 covers this
- OOSC2 Chapter 11 discusses quantified expressions
Direct links:
-
https://www.eiffel.org/doc/eiffel/Across - official documentation
- The iteration form uses loop/end, the boolean form uses all/some/end