set_difference()

Returns a list of unique items that occur in a first list but not in a second list.

Synopsis

set_difference(list-expression-1, list-expression-2)

Description

Returns a list of unique items that occur in the first list but not in the second list.

Parameters

list-expression-1

First of two lists whose difference is being taken.

list-expression-2

Second of two lists whose difference is being taken.

Returns

Returns a list of unique items that occur in first list but not in second list, sorted in increasing order.

Examples

The following returns [1,2,3]:

set_difference([1,2,3,4,5],[0,4,5,6])

See Also

union(), intersection()