This language bar is your friend. Select your favorite languages!

Idiom #118 List to set

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

Illustration
#Edit dateEdit SummaryEditor
👁 Δ 43 2019-10-14, 12:28 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 42 2019-10-14, 12:28 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 41 2019-09-29, 11:36 New Erlang implementation by user [nopeslide] nopeslide
👁 Δ 40 2019-09-27, 14:27 New Python implementation by user [L3viathan] L3viathan
👁 Δ 39 2019-09-27, 11:27 New Clojure implementation by user [MrEbbinghaus] MrEbbinghaus
👁 Δ 38 2019-09-26, 16:56 [Haskell] better to use qualified import as stated in docs sorki
👁 Δ 37 2019-09-26, 15:55 New Lisp implementation by user [foobar] foobar
👁 Δ 36 2019-09-26, 15:21 New Csharp implementation by user [aolszowka] aolszowka
👁 Δ 35 2019-06-28, 10:39 New Dart implementation by user [kuef] kuef
👁 Δ 34 2019-02-02, 05:08 [Scala] Parens are erroneous Debaran
👁 Δ 33 2019-02-02, 03:14 [Scala] Added explanation Debaran
👁 Δ 32 2019-02-02, 02:09 [Scala] Added parens for the heck of it Debaran
👁 Δ 31 2019-02-02, 02:08 New Scala implementation by user [Debaran] Debaran
👁 Δ 30 2019-01-02, 11:08 New Pascal implementation by user [Bart] Bart
👁 Δ 29 2018-08-29, 14:03 New PHP implementation by user [ricardo_sdl] ricardo_sdl
👁 Δ 28 2018-05-08, 01:45 New Cpp implementation by user [fantasy] fantasy
👁 Δ 27 2018-05-08, 01:41 New Cpp implementation by user [fantasy] fantasy
👁 Δ 26 2017-08-21, 19:39 [Lua] No need for sample values programming-idioms.org
👁 Δ 25 2017-08-21, 12:41 [Lua] added input Bug38
👁 Δ 24 2017-08-21, 12:40 New Lua implementation by user [Bug38] Bug38
👁 Δ 23 2017-04-29, 07:09 [Rust] Fixed demo link TheVTM
👁 Δ 22 2017-04-27, 09:51 New Rust implementation by user [TheVTM] TheVTM
👁 Δ 21 2016-11-30, 21:02 [Elixir] Variable y programming-idioms.org
👁 Δ 20 2016-11-30, 21:01 New Elixir implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 19 2016-11-30, 20:55 [Elixir] +DemoURL. +Warning programming-idioms.org
👁 Δ 18 2016-11-30, 20:34 [Elixir] +DocURL programming-idioms.org
👁 Δ 17 2016-10-29, 22:50 [Ruby] require set moved to imports steenslag
👁 Δ 16 2016-10-29, 13:31 [Elixir] List name is x. Also, we still have to define y. programming-idioms.org
👁 Δ 15 2016-10-28, 02:28 New Elixir implementation by user [Pedro Assumpcao] Pedro Assumpcao
👁 Δ 14 2016-09-27, 11:49 Updated picture URL by user [programming-idioms.org] programming-idioms.org
👁 Δ 13 2016-04-21, 10:51 New Perl implementation by user [Roboticus] Roboticus
👁 Δ 12 2016-04-06, 20:25 New Ruby implementation by user [steenslag]
👁 Δ 11 2016-02-18, 16:58 New JS implementation by user [Patman64]
👁 Δ 10 2016-02-16, 20:15 New JS implementation by user [Patman64]
👁 Δ 9 2016-02-16, 18:00 New Haskell implementation by user [JH]
👁 Δ 8 2016-01-29, 01:36 New D implementation by user [cym13]
👁 Δ 7 2016-01-24, 22:44 [D] More concise comments
👁 Δ 6 2016-01-24, 03:09 New D implementation by user [cym13]
👁 Δ 5 2016-01-24, 03:07 New Python implementation by user [cym13]
👁 Δ 4 2016-01-15, 12:47 New Go implementation by user [programming-idioms.org]
👁 Δ 3 2016-01-15, 10:13 Linked to idiom #34 [Create a Set of objects]
👁 Δ 2 2016-01-15, 10:13 Linked to idiom #119 [Deduplicate list]
1 2016-01-15, 10:06 Idiom creation by user [programming-idioms.org]