Skip to content

Instantly share code, notes, and snippets.

@seraphr
Created July 1, 2012 15:45
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 seraphr/3028779 to your computer and use it in GitHub Desktop.
Save seraphr/3028779 to your computer and use it in GitHub Desktop.
// 本当にやりたいこと
class Container[_X]
trait Get[_Elem, _Con <: Container[_Elem]]{
def get(a: _Con): _Elem
}
def con[_Elem, _Con <: Container[_Elem]](a: _Con)(implicit getter: Get[_Elem, _Con]): _Elem = getter.get(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment