Where can I find the reference in Lang specification or any blog how to read these constructions:
trait GenericFunctor[->>[_, _ ], ->>>[_, _ ], F[_]] {
def fmap[A, B](f: A ->> B): F[A] ->>> F[B]
}
or
trait Category[~>[_, _ ]] {
def compose[A, B, C](f: B ~> C)(g: A ~> B): A ~> C
def id[A]: A ~> A
}
if it’s a Type name – then the code F[A] ->>> F[B] shouldn’t be compilable, but it is
Scala allows symbols in identifiers. Let’s replace the symbolic identifiers with alphanumeric ones.
Scala provides infix type notation for binary type constructors. In other words,
A M Bis same asM[A, B]. Let’s rewrite above code without that sugar.Similary, the
Categorydefinition in your question can be rewritten as:Is it clear now?