victorious-xylophone-55816
01/03/2022, 4:17 PMprehistoric-nail-50687
01/03/2022, 4:32 PMvictorious-xylophone-55816
01/03/2022, 4:39 PMwhite-balloon-205
brave-dawn-64711
01/03/2022, 4:52 PMvictorious-xylophone-55816
01/03/2022, 6:23 PMcontext functions
and what Kotlin calls block receivers
Stealing the table/row/cell
DSL example from Scala docs:
table {
row {
cell("top left")
cell("top right")
}
row {
cell("bottom left")
cell("bottom right")
}
}
I think it would be roughly something like this 👀
def table(init: Table ?=> Unit) = ???
def row(init: Row ?=> Unit)(using t: Table) = ???
def cell(str: String)(using r: Row) = ???
fun table(block: (Table) -> Unit) {}
fun row(block: (Row) -> Unit) {}
fun Row.cell(str: String) {}
brave-dawn-64711
01/03/2022, 6:38 PMdelightful-oil-32538
01/30/2022, 6:26 PMbrave-dawn-64711
05/04/2022, 3:18 PMdelightful-oil-32538
05/22/2022, 6:35 PM