I came across this issue last week, and am hoping someone can offer an explanation or some guidance.
Given a long list of 2 numbers, I need to find any matching instances, but this will not work:
set a to {{1, 2}, {2, 3}, {3, 4}}
set b to {2, 3}
a contains b
-->false
Neither will this:
set a to {{1, 2}, {2, 3}, {3, 4}}
set b to {2, 3}
set the_count to 0
repeat with c in a
if c is equal to b then
set the_count to the_count + 1
end if
end repeat
the_count
-->0
But, if you test a single item of a list to see if it contains another list, it works:
set a to {{1, 2}, {2, 3}, {3, 4}}
set b to {2, 3}
set the_count to 0
repeat with c in a
if c contains b then
set the_count to the_count + 1
end if
end repeat
the_count
-->1
Is there some kind of rule that needs to be remembered when trying to find out whether or not a list is already present in another list?