strange behavior of subset

db <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Hello,

I used swi prolog Multi-threaded, 64 bits, Version 7.1.4
under Ubuntu.

I am suprise by the behavior of the subset predicate :


?- subset([p(A), q(A,B)], [p(1), p(2), q(2,3)]).
false.


?- subset([p(A), q(A,B)], [p(2), p(1), q(2,3)]).
A = 2,
B = 3.

Thus subset takes into account the order of the element
in the sets, what is not expected when one deals with sets.
  Is is normal ?

Thanks a lot

Dominique
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.