Logo

Programming-Idioms

History of Idiom 118 > diff from v19 to v20

Edit summary for version 20 by programming-idioms.org:
New Elixir implementation by user [programming-idioms.org]

Version 19

2016-11-30, 20:55:17

Version 20

2016-11-30, 21:01:55

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
y = MapSet.new(x)
Doc URL
http://elixir-lang.org/docs/stable/elixir/MapSet.html#new/1
Demo URL
http://play.elixirbyexample.com/s/362a9f6e90