Logo

Programming-Idioms

History of Idiom 118 > diff from v14 to v15

Edit summary for version 15 by Pedro Assumpcao:
New Elixir implementation by user [Pedro Assumpcao]

Version 14

2016-09-27, 11:49:57

Version 15

2016-10-28, 02:28:31

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
["a", "b", "c", "b"] |> Enum.uniq |> List.to_tuple
Comments bubble
Remove list duplication and convert to a tuple that has no ordering.