private fun fullFunc(func: () -> Unit): () -&gt...
# getting-started
f
private fun fullFunc(func: () -> Unit): () -> Unit = { beforeFunc; func; afterFunc }
m
just invoke them and you're good
d
You have to actually call the functions:
Copy code
private fun beforeFunc() {
    // do stuff before
}
private fun afterFunc() {
    // do stuff after
}
private fun fullFunc(func: () -> Unit): () -> Unit = { beforeFunc(); func(); afterFunc() }

val full = fullFunc {
    // do stuff in the middle
}
f
ah thank you