forEachWithPrevious

inline fun <T> Iterable<T>.forEachWithPrevious(function: (item: T, previous: T?) -> Unit)