Skip to content

Instantly share code, notes, and snippets.

@rbobillot
Created June 4, 2015 00:35
Show Gist options
  • Save rbobillot/f4dbc62e6c92cae382ea to your computer and use it in GitHub Desktop.
Save rbobillot/f4dbc62e6c92cae382ea to your computer and use it in GitHub Desktop.
implicit def manOf[T: Manifest]( t:T ) = new {
def getType = manifest[T]
}
implicit def range( x:Int ) = new {
def ->( n:Int ) = (x to n).toList
}
val list = (1 -> 7)
val res = list.mkString("[", ",", "]")
println( list.getType )
println( res )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment