forEachIndexedExtended

inline fun <T> Iterable<T>.forEachIndexedExtended(selector: (index: Int, isFirst: Boolean, isLast: Boolean, value: T) -> Unit)

Calls the selector function for each element in the collection, providing the index of the element and Booleans indicating whether the element is the first or last element in the collection.