all

inline fun <T> Iterable<T>.all(predicate: (T) -> Boolean): Boolean(source)

Returns true when every element matches predicate.

Stops at the first false predicate result. Returns true for an empty iterable without invoking the predicate. Exceptions from iteration or the callback propagate to the caller. The inline callback supports non-local returns.

Receiver

elements to visit in their iteration order.

Return

true if all elements match, or false otherwise.

Parameters

predicate

test receiving each visited element.