Is there a proposal out there somewhere for Kotlin...
# announcements
n
Is there a proposal out there somewhere for Kotlin to support variadic generic type parameters?
s
I’m not sure what you mean - doesn’t the language already support this?
n
Variadic arguments yes, generic ones, not yet.
s
like we have
listOf()
and a whole bunch of other helper methods that ostensibly rely on this being a thing
n
i.e. to prevent

https://kotlinlang.slack.com/files/UHVDR4BNZ/FHY4JQ2MP/screen_shot_2019-04-23_at_2.53.30_pm.png

s
oh, not function arguments, (generic) type parameters
I see
n
oh yeah. i should have said “variadic generic type parameters”
which Andrey Breslav replies to a bit
s
Alas, Kotlin doesn't now such construct, nor heterogenous lists/collections.
The functional library Arrow may help you out. It has the monadic types
HList
, not ideal, but it may work for you. Search for it here: https://arrow-kt.io/docs/apidocs/arrow-generic/alltypes/index.html#all-types
👍 2