Adapts a Kotlin function to a single argument Groovy Closure.
the expected type of the single argument to the closure.
the function to be adapted.