Skip to content

Instantly share code, notes, and snippets.

@kai5263499
Created July 11, 2014 00:55
Show Gist options
  • Save kai5263499/84aa341000e14d09d83c to your computer and use it in GitHub Desktop.
Save kai5263499/84aa341000e14d09d83c to your computer and use it in GitHub Desktop.
Option("bad") filter { _ != None } map { catching(classOf[NumberFormatException]) opt _.toInt } getOrElse None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment