This is an excerpt from the Scala Cookbook (partially re-worded for the internet). This is Recipe 10.7, “Make the Vector Class Your ‘Go To’ Immutable Sequence.”
Problem
You want a fast, general-purpose, immutable, sequential collection type for your Scala applications.
Solution
The Vector
class was introduced in Scala 2.8 and is now considered to be the “go to,” general-purpose immutable sequential data structure.