public inline fun <T> Iterable<T>.all(predicate: (T) -> Boolean): Boolean {
for (element in this) if (!predicate(element)) return false
return true
}
val list = listOf(1, 2, 3, 4, 5)
println(list.all{ it > 3 }) // false
println(list.all{ it > 0 }) // true
println(list.all{ it > 5 }) // false