Contains vs is in

hh hh at
Wed Jan 4 20:48:35 CET 2017

(LC Builder 'contains' vs 'is in')
Ali, are the following TRUE statements?

1. Every list "contains" the empty list.
2. [x] "contains" [x, x].
3. nothing "is in" the empty list.

> (Corrected in line 5 contains to "contains"):
> TMHO this abstract writing of Ali's examples is easy to remember,
> the different "level" of the comparison is visible by the brackets.
> x "is in" A if and only if A "contains" [x].
> (x "is in" A and y "is in" A) if and only if A "contains" [x,y].
> etc.
> where A is a list, x,y is any.
> >> Definitions. Let A and B be lists.
> >> x "is in" A if and only if x is an element of A.
> >> B "contains" A if and only if every element of A "is in" B.

More information about the use-livecode mailing list