The symbols themselves don't mean anything. They are arbitrary names Heiko picked:
> class Foo[A, B]
defined class Foo
> class Foo[M1[_], M2[_]]
defined class Foo
> class GenericFunctor[->>[_, _], ->>>[_, _], F[_]]
defined class GenericFunctor
They are parts of type parameters that they themselves are type constructors (higher-kinded types if you want to sound fancy).
Type applications can be written infix, so A ->> B
is same as ->>[A, B]
.
As per what's going on... Heiko says
Looking at the ingredients, we find all that we need: Types A
and B
are mapped to types F[A]
and F[B]
and maps A ->> B
are mapped to maps F[A] ->>> F[B]
.
Since we are talking category theory, we want to avoid the term function because that's implementation specific, but we want to describe something kind of like a function. Something-like-a-function in their lingo is an arrow. We need two of them since we don't want to assume the incoming and outgoing arrows to be the same. These two arrows are represented by ->>
and ->>>
. F[_]
is a container like List
and Option
. I think..
So fmap
(aka map
method in Scala) takes an arrow of values and returns another arrow of containers. Except unlike map
method, fmap
returns an arrow that takes a container.
A specific application of the GenericFunctor
using Function
for both arrows is Functor
. And specific application of Functor
that uses List
for the container is ListFunctor
.
object ListFunctor extends Functor[List] {
def fmap[A, B](f: A => B): List[A] => List[B] = as => as map f
}
So that's taking a function from A
to B
, and returning a function from List[A]
to List[B]
, calling map
internally.