Description of the provided commands

Home
Sitemap
 
::setops
Subcmd Description
create
value...

Creation of a list representing a set, i.e. without any duplicates. If the input contained such, they will be removed.

The result is a list, but without any duplicates in it.

contains
set element

Checks wether the given <set> contains the specified <element>.

Returns a boolean value, i.e. 0 or 1. The latter is returned if the element is a member of the set.

union
set...

Computes the union of the sets it was called with.

The result is a list representing a set consisting of the union of the sets used as arguments to the command. There are no duplicates in the result.

intersect
set...

Computes the intersection of the sets it was called with.

The result is a list representing a set consisting of the interseection of the sets used as arguments to the command.

diff
A B

Computes the set difference A - B of the two sets it was called with.

The result is a list representing a set containing the difference A - B.

symdiff
A B

Computes the symmetrical set difference (A-B)+(B-A) of the two sets it was called with. + denotes union, - denotes set difference. This is esssentially just the complementary operation to the intersection of A and B.

The result is a list representing a set containing the symmetrical set difference of A and B.

empty
set

Checks wether the argument represents an empty set or not.

The result is a boolean value, 0 or 1. The latter is returned if the argument represents an empty set.

size
set

Returns the number of elements in the argument set.


© Andreas Kupries
Last update at Sat Mar 31 19:20:06 CEST 2001