Skip to content

Instantly share code, notes, and snippets.

Created Jun 20, 2013

What would you like to do?
// Executed as a Scala script
// Scala version 2.10.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_01)
class Person(firstLast: String) {
val ss = firstLast.trim.split(" ")
ss.zipWithIndex foreach println
new Person("John Doe")
// [Ljava.lang.String;
// 3
// (John,0)
// (,1)
// (Doe,2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.