
Scala
Get flash to fully experience Pearltrees
Scala School
Other Languages: Русский About Scala school started as a series of lectures at Twitter to prepare experienced engineers to be productive Scala programmers. Scala is a relatively new language, but draws on many familiar concepts. Thus, these lectures assumed the audience knew the concepts and showed how to use them in Scala. We found this an effective way of getting new engineers up to speed quickly.Scala 2.8 Collections API -- Arrays
Array is a special kind of collection in Scala. On the one hand, Scala arrays correspond one-to-one to Java arrays. That is, a Scala array Array[Int] is represented as a Java int[] , an Array[Double] is represented as a Java double[] and a Array[String] is represented as a Java String[] . But at the same time, Scala arrays offer much more than their Java analogues. First, Scala arrays can be generic .28 Jul 2008 As I hinted previously , this series is intended to delve into Scala’s extensive collections API and the many ways in which it can make your life easier. Probably the most important operations you could ever perform on collections are those which examine each element, one at a time. After all, what’s a more common array idiom than looping over all values? In that vein, this article starts by looking at foreach , the imperative programmer’s bread-and-butter when it comes to types like Array and List . But rather than just stopping there, we also will look at more powerful, higher-order operations like fold, map and the ever-mysterious: flatMap .

