[erlang-questions] Bug in sets module? Equal sets aren't equal

Hugo Mills hugo@REDACTED
Mon Feb 20 14:58:28 CET 2017

   I've just turned up this little problem:

hrm@REDACTED:~/nightglass/software/childe$ erl
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]
3> sets:from_list([[2, 2], [2, -2]]) =:= sets:from_list([[2, -2], [2, 2]]).

   Is this expected behaviour, or a bug in the sets module?

   How should I compare sets for equality? There's no equality
comparison function in the module. (I can see any number of solutions
I could roll myself, but they're all a bit ugly).


Hugo Mills             | I am an opera lover from planet Zog. Take me to your
hugo@REDACTED carfax.org.uk | lieder.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170220/820d6f63/attachment.bin>

More information about the erlang-questions mailing list