rdhruva
06/02/2024, 3:32 PMdependsOn {
"foo"
"bar"
"baz"
}
and then I can "collect" the 3 as a list.
What I ended up doing for now is:
dependsOn {
add("foo")
add("bar")
add("baz")
}
And the definition looks like:
fun dependsOn(init: MutableList<String>.() -> Unit)
Is there a better way to do this, such that I don't need the add(...)
?wakingrufus
06/02/2024, 7:22 PMwakingrufus
06/02/2024, 7:22 PMrdhruva
06/02/2024, 8:57 PMrdhruva
06/02/2024, 8:58 PM+
instead of add()
thenwakingrufus
06/02/2024, 9:21 PMMatteo Mirk
06/10/2024, 2:45 PMrdhruva
06/10/2024, 3:09 PM