Home Online Manual
Top
Back: isSuperset
Forward: stanleyreisner_lib
FastBack:
FastForward:
Up: sets_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.15.19.8 addElement

Procedure from library sets.lib (see sets_lib).

Usage:
addElement(M,a) ; M Set, a freely chosen element

Return:
adds the Element a to the Set M

Example:
 
LIB "sets.lib";
//example for addElement
int a=4;
list L = 1,2,3;
Set S = L;
S;
==> {3; 2; 1}
==> Set with 3 elements
==> 
a;
==> 4
addElement(S,a);
==> {1; 2; 3; 4}
==> Set with 4 elements
==>