y = x |> Enum.uniq |> List.to_tuple
y := make(map[T]struct{}, len(x))
for _, v := range x {
y[v] = struct{}{}
}
func sliceToSet[T comparable](x []T) map[T]struct{} {
y := make(map[T]struct{}, len(x))
for _, v := range x {
y[v] = struct{}{}
}
return y
}
Set<T> y = new HashSet<>(x);
Set<T> y = x.stream().collect(toSet());
Set<T> y = new LinkedHashSet<>(x);
my @y = uniq @x;
local hash = {} local y = {} for _,v in ipairs(x) do if (not hash[v]) then y[#y+1] = v hash[v] = true end end
(def y (set x))
std::set<T> y (x.begin (), x.end ());
std::unordered_set<T> y (x.begin (), x.end ());
var y = new HashSet<T>(x);
bool[typeof(x[0])] y; foreach (e ; x) y[e] = true;
auto y = redBlackTree(x);
var y = x.toSet();
y = x |> Enum.uniq |> List.to_tuple
y = MapSet.new(x)
Y = sets:from_list(X).
y := make(map[T]struct{}, len(x)) for _, v := range x { y[v] = struct{}{} }
func sliceToSet[T comparable](x []T) map[T]struct{} { y := make(map[T]struct{}, len(x)) for _, v := range x { y[v] = struct{}{} } return y }
y = Set.fromList x
var y = new Set(x);
Set<T> y = new HashSet<>(x);
Set<T> y = x.stream().collect(toSet());
Set<T> y = copyOf(x);
Set<T> y = new HashSet<T>(x);
Set<T> y = new LinkedHashSet<>(x);
(setf y (remove-duplicates x))
NSSet *y=[NSSet setWithArray:x];
$y = array_unique($x);
for i := Low(X) to High(X) do Include(Y,X[i]);
my %y = map {$_=>0} @x;
my @y = uniq @x;
y = set(x)
y = {*x}
y = x.to_set
let y: HashSet<_> = x.into_iter().collect();
val y = x.toSet
y := x asSet