Logo

Programming-Idioms

History of Idiom 118 > diff from v30 to v31

Edit summary for version 31 by Debaran:
New Scala implementation by user [Debaran]

Version 30

2019-01-02, 11:08:40

Version 31

2019-02-02, 02:08:23

Idiom #118 List to set

Create set y from list x.
x may contain duplicates. y is unordered and has no repeated values.

Illustration

Idiom #118 List to set

Create set y from list x.
x may contain duplicates. y is unordered and has no repeated values.

Illustration
Code
val y = x.toSet