Skip to content

Instantly share code, notes, and snippets.

@aloiscochard
Created January 17, 2016 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aloiscochard/90a4eeb0ceb627045335 to your computer and use it in GitHub Desktop.
Save aloiscochard/90a4eeb0ceb627045335 to your computer and use it in GitHub Desktop.
Scala - Identifying Kinds

Identification scheme for Scala kind annotations.

The number of parameters is followed by an optional list of of modifiers, starting with a letter to indicate the parameter rank and optionally swapping the case from the previous letter in case the type at this position is also higher kinded.

Examples:

  • [_]
    • 1
  • [_, _]
    • 2
  • [_[_], _]
    • 2a1
  • [_, _[_]]
    • 2b2
  • [_[_[_]], _]
    • 2a1A1
  • [_, _[_[_]]]
    • 2b1A1
  • [_[_, [_]], _]
    • 2a2B1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment