4

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

[->>[_,_]] 
2
  • possible duplicate of In Scala type parameters, what do ->> and ->>> mean? Commented Apr 10, 2013 at 13:05
  • As with methods of a single argument, generic types / type constructors of two arguments can be used in infix form. That probably makes the name a bit more sensible, since it is presumably meant to be used that way. Commented Apr 10, 2013 at 16:12

1 Answer 1

8

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Great references, would you mind to add this same answer to the original question referred to by @om-nom-nom?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.