For example here is all()
in action:
fun Shop.checkAllCustomersAreFrom(city: City): Boolean =
customers.all { it.city == city }
And here is the equivalent from the kotlin documentation:
inline fun <T> Iterable<T>.all(
predicate: (T) -> Boolean
): Boolean
Can someone please explain each part of the second code block and why it's written like that?
Apologies if this is a basic question, but if I learn this it will be much easier to read documentation.