ListIntersect

Qubes 10.0 Computes the intersection of multiple lists.

Syntax

ListIntersect(list1, list2, ...)
list1 = first list in the intersection
list2 = second list in the intersection
... = further values or lists in the intersection

Remarks

Computes the intersection of several lists, using the first list1 as reference:

  • returns elements in the order they are in list1
  • duplicate elements are allowed and preserved in list1 if they are also present in one of the subsequent lists
  • if a value is passed, it will be promoted to a list with a single element

Matches are exact, ie. '0' as a string and 0 as a number are considered as two distinct values.

Examples

ListIntersect(List(1, 2, 3), List(4, 3, 2), List(0, 7, 3)) = { 3 }
ListIntersect(List(1, 2, 3, 2), 2) = { 2, 2 }
ListIntersect(3, 2) = { }

Classification

Ranges