Curiosity insisted that I did a little experimenting with this.
The script ...
set aList to {{1, 2}, {2, 3}, {3, 4}} {2, 3} is in aList --> false
seems to have the correct syntax, at least according to my reading of the dictionaries. But ... it does NOT return a correct result.
So, I tried variations on the theme and (avoiding other syntax that did not work) I found something that does seem to work correctly ...
set aList to {{1, 2}, {2, 3}, {3, 4}} {{2, 3}} is in aList --> true {{1, 1}} is in aList --> false
I don't understand this syntax or why it should work. It just doesn't make sense to me, but it seems to make sense to AppleScript. It returns the correct result every time !!!
|