Skip to content

Instantly share code, notes, and snippets.

@krishnanraman
Created February 19, 2014 19:29
Show Gist options
  • Save krishnanraman/9099712 to your computer and use it in GitHub Desktop.
Save krishnanraman/9099712 to your computer and use it in GitHub Desktop.
scala> def foo[T](x:T, y:T)(implicit n:Numeric[T]) = n.toDouble(x)+n.toDouble(y)
foo: [T](x: T, y: T)(implicit n: Numeric[T])Double
scala> foo(2,3.0)
res4: Double = 5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment