Logo

Programming-Idioms

History of Idiom 118 > diff from v11 to v12

Edit summary for version 12 by :
New Ruby implementation by user [steenslag]

Version 11

2016-02-18, 16:58:03

Version 12

2016-04-06, 20:25:51

Idiom #118 List to set

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

Idiom #118 List to set

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

Code
require 'set'
y = x.to_set