Scala ~> (tilde greater than) operator
This is also used in Akka streams as the edge operator.
~>
is just the placeholder-name for the type-parameter of Category
. Like the T
in class Option[T]
.
Additionally, Scala syntax allows you to write B ~> C
as a shorthand for ~>[B, C]
.
Maybe things get clearer, if you rename it:
trait Category[Mapping[_, _]] {
def compose[A, B, C](f: Mapping[B, C])(g: Mapping[A, B]): Mapping[A, C]
def id[A]: Mapping[A, A]
}