Logo

Programming-Idioms

History of Idiom 118 > diff from v17 to v18

Edit summary for version 18 by programming-idioms.org:
[Elixir] +DocURL

Version 17

2016-10-29, 22:50:36

Version 18

2016-11-30, 20:34:36

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
x |> Enum.uniq |> List.to_tuple
Code
x |> Enum.uniq |> List.to_tuple
Comments bubble
Remove list duplication and convert to a tuple that has no ordering.
Comments bubble
Remove list duplication and convert to a tuple that has no ordering.
Doc URL
http://elixir-lang.org/docs/stable/elixir/List.html#to_tuple/1