Given function foo :
fun foo(m: String, bar: (m: String) -> Unit) { bar(m) }
We can do:
foo(\"a message\", { println
Just use "::" before method name
fun foo(function: () -> (Unit)) { function() } fun bar() { println("Hello World") }
foo(::bar) Output : Hello World
foo(::bar)
Hello World