foldValidated

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

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.