Ifvwm
10/14/2019, 5:53 AMsealed class Fix<F>
data class MkFix<F> (val x: F<Fix<F>>): Fix<F>()
this is possible?Amirul Zin
10/14/2019, 6:02 AMF
and just use it as is. e.g.:
sealed class Fix<F>
data class MkFix<F> (val x: F): Fix<F>()
Ifvwm
10/14/2019, 6:04 AMAmirul Zin
10/14/2019, 6:05 AMIfvwm
10/14/2019, 6:06 AMAmirul Zin
10/14/2019, 6:07 AMList<List<List<List<T>>>>
Since T is generic, so even T itself can be another parametrized generic.marstran
10/14/2019, 6:08 AMF
type to `Fix<F>`: sealed class Fix<F>
data class MkFix<F : Fix<F>> (val x: F): Fix<F>()
Ifvwm
10/14/2019, 9:03 AMkarelpeeters
10/14/2019, 9:10 AMclass Foo: Fix<Foo>()
Ifvwm
10/14/2019, 9:28 AMstreetsofboston
10/14/2019, 12:29 PMF<A>
where F
itself is a generic type parameter. Higher kind types are not possible on Kotlin.