Chapter 8Collections

The Scala library contains a rich set of collections classes along with powerful operations to compose, iterate over, and extract elements. Working with these collections is commonplace when creating Scala applications. Learning these collections thoroughly is essential if you want to be productive in Scala.

In this chapter, you’ll learn how to create instances of common Scala collections and how to iterate through them. You can still use the collections from the JDK such as ArrayList, HashSet, and simple arrays, but in this chapter we’ll focus on the Scala-specific collections and how to work with them.

Get Pragmatic Scala now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.