I have the following code that I found in this article (http://hseeberger.wordpress.com/2010/11/25/introduction-to-category-theory-in-scala/).
trait GenericCategory[->>[_, _]] {
def id[A]: A ->> A
def compose[A, B, C](g: B ->> C, f: A ->> B): A ->> C
}
I can't figure out the syntax right next to the trait's name
[->>[_,_]]
It's a higher-kinded type, described nicely in this introduction and in this research paper.
The reason you might find it confusing is that ->>
is the name for the higher-kinded type -- it might have as well been called Arrow
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With