The sentence (1 in A) is returning 1, it must return true to give uniformity with the rest of the function outputs
Code : Tout sélectionner
A := set(1, 2, 3);
print(1 in A, 4 not in A);
A.extend(4);
print(4 not in A)
1,true
false
Modérateur : xcasadmin
Code : Tout sélectionner
A := set(1, 2, 3);
print(1 in A, 4 not in A);
A.extend(4);
print(4 not in A)