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

How to merge Scala sequential collections (List, Vector, ArrayBuffer, Array, Seq)

$
0
0

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 10.22, “How to Merge Scala Sequential Collections”

Problem

You want to join two sequences into one sequence, either keeping all of the original elements, finding the elements that are common to both collections, or finding the difference between the two sequences.

Solution

There are a variety of solutions to this problem, depending on your needs:

read more


Viewing all articles
Browse latest Browse all 25

Trending Articles