O'Reilly logo

Building Applications with Scala by Diego Pacheco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scala collections

In the previous section, we saw how to create the List and Set structures in Scala in an immutable way. Now we will learn to work with the List and Set structures in a mutable way, and also with other collections such as sequences, tuples, and Maps. Let's take a look at the Scala collections hierarchy tree, as shown in the following diagram:

Scala collections

Now let's take a look at the Scala Seq class hierarchy. As you can see, Seq is traversable as well.

Scala collections

Scala collections extend from traversable, which is the main trait of all collection's descends. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required