…and when I uncomment any of the commented-out ($ contains sublist $) queries with periods in them, the query fails and the test fails, despite me being clearly able to see that the list does, in fact, contain the sublist. What’s going on here? (The same thing happens with vertical bars.)
Without having access to the (short range scan) code I can’t be sure, but am I right that you added in a backslash space to pad the spacing between 3 and . q, etc? It seems that that gets translated into a @\s dictionary word, so [3 . q] isn’t a sublist of [3 \s . q] because of the space word. That’s what I can figure out from messing around a bit in dgdebug at least, if I’m right the fix is to do ($Words contains sublist [3 \s . q]), at least I think?
I don’t think the periods are the issue here, it’s the numbers, or more accurately a duplication of numbers in the main list. This is what I think is happening: when the ‘contains sublist’ check is made the library in turn splits the sublist into heads and tails [3] and [. q] and then looks for [3] in the main list to start checking for the sublist. It finds it but it is the first ‘3’ in the main list. Not the 3 we are looking for, as the rest of the sublist doesn’t follow this 3 the check fails. As a test if you change the 3 in the main list and the sublist check to 33 the check passes.
($Words contains sublist [33 . q])
This also passes.
($Words contains sublist [10 1 . . . . .])
Not much help for a solution I’m afraid, but it may help narrow one down, I’ll keep looking.