The `@extension` export the extension functions fr...
# arrow
a
The
@extension
export the extension functions from a type class
Copy code
interface Functor<F> {
  fun <A, B> Kind<F, A>.map(f: (A) -> B): Kind<F, B>
}
to inheritors
Copy code
@extension interface IOFunctor : Functor<ForIO> {
  override fun <A, B> Kind<ForIO, A>.map(f: (A) -> B): IO<B> =
    fix().map(f)
}
i
is the map function in IOFunctor generated or not
a
It's not, the annotation just give you the ability to get and override the extension function declared on the interface
i
Meaning, if I am composing multiple type classes into one. I always use @extension and when my type classes operate over HKT I also add @higherkinds or is it not necessary
a
it is
i
thank you
👍 1