All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dev.inmo.micro_utils.common.BreakAsPairs.kt Maven / Gradle / Ivy

package dev.inmo.micro_utils.common

fun  List.breakAsPairs(): List> {
    val result = mutableListOf>()

    for (i in 0 until size - 1) {
        val first = get(i)
        val second = get(i + 1)
        result.add(first to second)
    }

    return result
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy