closureOf

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

Adapts a Kotlin function to a single argument Groovy Closure.

Parameters

action

the function to be adapted.

Type Parameters

T

the expected type of the single argument to the closure.

See also