by Venkat Subramaniam
In the preceding chapter, we looked at the object-oriented side and the functional side of Scala. These two programming styles interplay powerfully in collections—and that’s what we’ll see in this chapter.
A direct look at the Scala collections hierarchy can be overwhelming. But when distilled down, each Scala collection can be viewed as belonging to one of two categories: immutable or mutable. Some Scala collections are also lazy (read: efficient).
For starters, in both the immutable and mutable flavors, Scala provides implementations of Seq, Set, and Map. Seqs (lists) are ordered collections, sets are unordered, and maps are collections of key-value pairs.