Skip to content

Instantly share code, notes, and snippets.

@kijuky
Created February 15, 2012 12:03
Show Gist options
  • Save kijuky/1835289 to your computer and use it in GitHub Desktop.
Save kijuky/1835289 to your computer and use it in GitHub Desktop.
3912657840
scala> val v:Long = 3912657840L
v: Long = 3912657840
scala> (1 to 9).map { v % _ }
res1: scala.collection.immutable.IndexedSeq[Long] = Vector(0, 0, 0, 0, 0, 0, 0,
0, 0)
scala> val sv = "3912657840"
sv: java.lang.String = 3912657840
scala> sv.sliding(2).map { _.toInt }.map { v % _ }.toList
res2: List[Long] = List(0, 0, 0, 0, 0, 0, 0, 0, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment