CoCoA:MakeSet

From ApCoCoAWiki
Revision as of 10:02, 24 October 2007 by XMLBot (talk | contribs) (pushing XML rev. 1.46, again)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MakeSet

remove duplicates from a list

Description

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

It used to be called Set, but this is obsolescent for the

ambiguity with the command named <ttref>Set-Unset</ttref> for setting panel options.

Example

  MakeSet([2,2,2,1,2,1,1,3,3]);
[2, 1, 3]
-------------------------------

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


Syntax

MakeSet(L:LIST):LIST

EqSet

Intersection

IntersectionList

Insert

Remove

   <type>list</type>