diff --git a/matrix/src/commonMain/kotlin/dev/inmo/micro_utils/matrix/RowBuilder.kt b/matrix/src/commonMain/kotlin/dev/inmo/micro_utils/matrix/RowBuilder.kt index 22851e58c30..f79a71ea2c5 100644 --- a/matrix/src/commonMain/kotlin/dev/inmo/micro_utils/matrix/RowBuilder.kt +++ b/matrix/src/commonMain/kotlin/dev/inmo/micro_utils/matrix/RowBuilder.kt @@ -5,11 +5,10 @@ class RowBuilder { val row: Row get() = mutRow - fun add(t: T) = mutRow.add(t) - operator fun T.unaryPlus() = add(this) + fun column(t: T) = mutRow.add(t) + operator fun T.unaryPlus() = column(this) } fun row(block: RowBuilder.() -> Unit): List = RowBuilder().also(block).row -fun RowBuilder.column(element: T) = +element fun RowBuilder.columns(elements: List) = elements.forEach(::column) fun RowBuilder.columns(vararg elements: T) = elements.forEach(::column)