Skip to content

Instantly share code, notes, and snippets.

@stephenjudkins
Forked from fayimora/Sort.scala
Created January 5, 2013 00:24
Show Gist options
  • Save stephenjudkins/4458765 to your computer and use it in GitHub Desktop.
Save stephenjudkins/4458765 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