Sets

difference

Description

Examples

Arguments:
VALUES1(value-expression{1})
VALUES2(value-expression{1})

Returns the difference of the values in VALUES1 and VALUES2, i.e. the values that are in VALUES1, but not in VALUES2. The values in VALUES1 that does not exist in VALUES2 are kept in their original relative positions.
["difference",
["list", "A", "B"], ["list", "B"]]

Returns ["A"].

["difference", "A", ["list", "B", "C"]]

Returns ["A"].

["difference",
["list", "A", "B", "C", "D"],
["list", "A", "B", "E"]]

Returns ["C", "D"].

["difference",
["list", "D", "A", "D", "E", "B"],
["list", "A", "F", "F", "B", "C"]]

Returns ["D", "D", "E"].

intersection

Description

Examples

Arguments:
VALUES1(value-expression{1})
VALUES2(value-expression{1})

Returns the intersection of the values in VALUES1 and VALUES2, i.e. the values that are in both VALUES1 and VALUES2. The values in VALUES1 that exist in VALUES2 are kept in their original relative positions.
["intersection",
["list", "A", "B"], ["list", "B", "C"]]

Returns ["B"].

["intersection", "B", ["list", "B", "C"]]

Returns ["B"].

["intersection", "A", ["list", "B", "C"]]

Returns [].

["intersection",
["list", "B", "C", "B", "D", "A"],
["list", "A", "F", "F", "B", "E", "B", "C"]]

Returns ["B", "C", "B", "A"].

intersects

Description

Examples

Arguments:
VALUES1(value-expression{1})
VALUES2(value-expression{1})

Same as intersection, but returns a boolean value. Returns true if the two arguments have values in common.
["intersects",
["list", "A", "B"], ["list", "B", "C"]]

Returns true.

["intersects", "B", ["list", "B", "C"]]

Returns true.

["intersects", "A", ["list", "B", "C"]]

Returns false.

union

Description

Examples

Arguments:
VALUES1(value-expression{1})
VALUES2(value-expression{1})

Returns the union of the values in VALUES1 and VALUES2, i.e. the values that are either in VALUES1 or in VALUES2. The values in VALUES1 are returned first and kept in their original relative positions and after that the values in VALUES2 are kept in their original relative positions. Only the first occurrence of a value is returned.
["union",
["list", "A", "B"], ["list", "B", "C"]]

Returns ["A", "B", "C"].

["union", "A", ["list", "B", "C"]]

Returns ["A", "B", "C"].

["union",
["list", "B", "C", "B", "D", "A"],
["list", "A", "F", "F", "B", "E", "B", "C"]]

Returns ["B", "C", "D", "A", "F", "E"].