pairs

fun <T> Iterable<T>.pairs(): List<Pair<T, T>>

Returns a partitioned list of pairs


inline fun <T, R> Iterable<T>.pairs(crossinline transform: (T, T) -> R): List<R>

Returns a partitioned list of pairs transformed with the given transformer