foldValidated

inline fun <S, T : S> Iterable<T>.foldValidated(validationFunction: (S, T) -> Boolean): Boolean

Validates the relationship between every element of Iterable.

Iterates through the elements invoking the validationFunction on each one. Returns false on the first element that does not pass the validation function, otherwise true.

Parameters

validationFunction

is the accumulator function that verifies the elements.

Sources

Katlib source
Link copied to clipboard