📅  最后修改于: 2022-03-11 14:59:24.391000             🧑  作者: Mango
Kotlin DSL lets you define a specific "language" using an extension
function under the hood. Useful for Builders, UI Layouts, and other
situations that have a standard structure.
fun doSomething(config: DoSomethingConfig.() -> Unit) {
...
}
doSomething {
configVar1 = ...
configVar2 = ...
if(condition) configVar3 = ...
}