mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-22 16:47:13 +00:00
add one more flatMatrix
This commit is contained in:
parent
2acb177ad6
commit
7507c107b4
@ -24,6 +24,12 @@ fun <T> flatMatrix(block: RowBuilder<T>.() -> Unit): Matrix<T> {
|
||||
}.matrix
|
||||
}
|
||||
|
||||
fun <T> flatMatrix(vararg elements: T): Matrix<T> {
|
||||
return MatrixBuilder<T>().apply {
|
||||
row { elements.forEach { +it } }
|
||||
}.matrix
|
||||
}
|
||||
|
||||
operator fun <T> RowBuilder<T>.plus(t: T) = add(t)
|
||||
|
||||
class RowBuilder<T> {
|
||||
|
Loading…
Reference in New Issue
Block a user