Thanks for your reply
I guess so since I didn’t find any syntactic means in Kotlin’s grammar to maintain genericy.
I was inspired by https://kotlinlang.org/docs/reference/reflection.html#function-references, see val predicate: ...
and just try to understand what is possible in Kotlin and what is not.
They are not the same, printergen
calls docApply
. Whereas in the Kotlin documentation I referred to, predicate
is set with a function instance ::isOdd
.
val predicate: (String) -> Boolean = ::isOdd
My aim is to do the same with printergen
and docApply
. I have no current use for that, I’m just exploring what’s doable in Kotlin. I’m asking because I might have missed something in the Kotlin specification.