Youssef Shoaib [MOD]
09/18/2025, 10:50 PMinterface Functor<F<_>> { // Imaginary syntax, based on Scala's F[_]
fun <A, B> F<A>.map(f: (A) -> B): F<B>
}
object ListFunctor: Functor<List> {
override fun <A, B> List<A>.map(f: (A) -> B): List<B> = ...
}
It's good to note that Kotlin doesn't have raw types, unlike Java, and so seeing just List means the type constructor List, and not a raw type equivalent to List<*>