Scala course

Scala Level 2: Collections

Collections is level 2 of 13 of the LoWisa Scala course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Immutable Collections

  • List, Vector, Map. Immutable List, Vector, Set and Map are the defaults: operations return new collections.
  • Persistent structures. Immutable does not mean copied: structural sharing makes new versions cheap.
  • Choosing collections. List for head-heavy recursion, Vector for indexed bulk, Map for lookup: chosen by access.

Transformation Operations

  • map and filter. map, filter and flatMap transform collections: pipelines that say what, not how.
  • fold and reduce. foldLeft collapses a collection through an accumulator: sums, maxima, built-up results.
  • groupBy. groupBy buckets by a function’s answer: reporting shapes in one call.

Lazy and Eager Processing

  • Views. A view makes a pipeline lazy: elements flow one at a time, no intermediate collections.
  • LazyList. LazyList materialises on demand: infinite sequences defined safely.
  • Choosing laziness. Laziness is a tool, not a default: bulk transforms stay eager, huge or infinite data goes lazy.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Scala Level 2: Collections cover?

Immutable Collections, Transformation Operations, Lazy and Eager Processing: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 1: Scala Foundations, which covers Values and Types, Expressions, Functions.

Learn Scala on your phone

The first level is free. LoWisa is on Google Play and the App Store.