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

commonMain.dev.inmo.micro_utils.matrix.MatrixBuilder.kt Maven / Gradle / Ivy

There is a newer version: 0.24.0
Show newest version
package dev.inmo.micro_utils.matrix

class MatrixBuilder {
    private val mutMatrix: MutableList> = ArrayList()
    val matrix: Matrix
        get() = mutMatrix

    fun row(t: List) = mutMatrix.add(t)
    operator fun List.unaryPlus() = row(this)
}

fun  MatrixBuilder.row(block: RowBuilder.() -> Unit) = +RowBuilder().also(block).row
fun  MatrixBuilder.row(vararg elements: T) = +elements.toList()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy