Language Guide

CHAPTER 6
Expressions
Operations 175
Contains, Is Contained By 6
The Contains and Is Contained By operators work with lists, records,
and strings.
LIST
A list contains another list if the list to the right of the operator is a sublist
of the list to the left of the operator. A sublist is a list whose items appear in
the same order and have the same values as any series of items in the other list.
For example,
{ "this", "is", 1 + 1, "cool" } contains { "is", 2 }
is true, but
{ "this", "is", 2, "cool" } contains { 2, "is" }
is false.
A list is contained by another list if the list to the left of the operator is a sublist
of the list to the right of the operator. For example,
{ "is", 2} is contained by { "this", "is", 2, "cool" }
is true. Both Contains and Is Contained By work if the sublist is a single
value. For example,
{ "this", "is", 2, "cool" } contains 2
and
2 is contained by { "this", "is", 2, "cool" }
are true.