closureOf

fun <T> Any.closureOf(action: T.() -> Unit): Closure<Any?>(source)

Adapts a Kotlin function to a single argument Groovy Closure.

Parameters

T

the expected type of the single argument to the closure.

action

the function to be adapted.

See also