12. Scala?
“Java is nice”
“And we’re so jealous”
“… of Haskell”
“… and Erlang”
“… and Python”
13. Functional style
Express processes, not just things
def listCapitalisedWords(text:String) =
text.split("s").
filterNot(_.isEmpty).
filter(_.charAt(0).isUpper)
23. Data structures
Choose the right one, and the algorithms take care of themselves
val weekdays = List(“Monday”, “Tuesday”,
“Wednesday”, “Thursday”,
“Friday”)
val beatles = Set(“Ringo”, “John”,
“Paul”, “George”)
val aTuple = (1, “John Smith”, false)
val dataset = Array( (1, “Ion Popescu”),
(3, “Maria Teodorescu”) )