intersection()

Returns a list of unique items that occur in two lists, sorted in increasing order.

Synopsis

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

Description

Returns a list of unique items that occur in both lists, sorted in increasing order.

Parameters

list-expression-1

First of two lists whose intersection is being taken.

list-expression-2

Second of two lists whose intersection is being taken.

Returns

Returns a list of unique items that occur in both lists, sorted in increasing order.

Examples

The following returns [4,5]:

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

See Also

union(), set_difference()