Quantcast
Channel: alvinalexander.com - sequence
Viewing all articles
Browse latest Browse all 25

Make the Vector class your default immutable sequence (Scala best practice)

$
0
0

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.

read more


Viewing all articles
Browse latest Browse all 25

Trending Articles