to be fair, [1,3,5,7] has 7 makes the same amount of sense. Every language has weird paradigms, "in" isnt meant to be used with arrays, but it works anyway just due to how the language is structured. IMO it should error which would solve this exact case, but technically there is nothing wrong semantically, so it just gives you an answer.
View all comments
Show parent comment
8
u/KCGD_r 16d ago
to be fair, [1,3,5,7] has 7 makes the same amount of sense. Every language has weird paradigms, "in" isnt meant to be used with arrays, but it works anyway just due to how the language is structured. IMO it should error which would solve this exact case, but technically there is nothing wrong semantically, so it just gives you an answer.