Top index Wirbel home

::forall

forall(acollection, function(tuple(A), boolean) predicate) - check if all items of collection fullfill predicate

forall(acollection, function(tuple(A), boolean) predicate) checks if all elements of the string, list or set acollection fullfill predicate. predicate is a function that is called with an element and must return true or false. When the predicate is true for all members of the collection then forall(acollection, function(tuple(A), boolean) predicate) returns true.

Examples

forall([1,2,3,4,5], lambda x: x>0) == true
forall({1,2,3,4,5}, lambda x: x>3) == false

See also

forsome