https://kotlinlang.org logo
#arrow
Title
a

AdrianRaFo

04/11/2019, 11:03 AM
The
@higherkinds
creates the boilerplate to gives
Foo
the ability of work with a
HKT
Copy code
@higherkind
 class Option<A> : OptionOf<A>
to
Copy code
class ForOption private constructor() { companion object }
 typealias OptionOf<A> = arrow.Kind<ForOption, A>
 inline fun <A> OptionOf<A>.fix(): Option<A> =
   this as Option<A>