up previous next
MakeSet    --    remove duplicates from a list


Syntax
MakeSet(L: LIST): LIST

Description
This function returns a list obtained by removing duplicates from L .

NOTE: to test two sets for equality use the function EqSet instead of a normal equality test (because the latter yields false if the elements are in a different order).

Example
/**/  MakeSet([2,2,2,1,2,1,1,3,3]);
[2, 1, 3]
/**/  MakeSet([2,2,2,1,2,1,1,3,3]) = [1,2,3];
false
/**/  EqSet([2,2,2,1,2,1,1,3,3],  [1,2,3]);
true

See Also