Dec 3, 2020
The JDK collections like ArrayList
already implement Iterable
. Likewise in Scala, it’s already taken care of, probably the same in Kotlin. It’s a matter of concern only when you want to create your own data structures.
So you can almost take Iterable
for granted. I think that the Comparable
and Comparator
interfaces are of more frequent concern.