intersect

Description

Returns the intersection of two lists.

Copy
 list intersect( list list1 , list list2 )

Return the elements of list1 that are also in list2.

Examples

 {intersect([1, 2, 3, 4], [3, 4, 5, 6])} ---> [3, 4]