Skip to content

Instantly share code, notes, and snippets.

@missingfaktor
Created April 23, 2012 17:24
Show Gist options
  • Save missingfaktor/2472480 to your computer and use it in GitHub Desktop.
Save missingfaktor/2472480 to your computer and use it in GitHub Desktop.
scala> def isNumeric[N](implicit ev: Numeric[N] = null): Boolean = ev != null
isNumeric: [N](implicit ev: Numeric[N])Boolean
scala> isNumeric[String]
res2: Boolean = false
scala> isNumeric[Int]
res3: Boolean = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment