Skip to content

Instantly share code, notes, and snippets.

@fayimora
Created January 5, 2013 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fayimora/4458719 to your computer and use it in GitHub Desktop.
Save fayimora/4458719 to your computer and use it in GitHub Desktop.
object Sort extends App {
//val toCells = (_: String).trim.split(" +")
//val input = io.Source.stdin.getLines.toList.map(toCells).foreach{line => }
val input = List("car", "truck", "8", "4", "bus", "6", "1")
val (matches, mismatches) = input.partition(_.matches("""\d+"""))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment