ostap / comp

a tool for querying files in various formats
MIT License
43 stars 2 forks source link

equality operator is missing symmetric property #26

Open julochrobak opened 11 years ago

julochrobak commented 11 years ago

The equality operator is missing the symmetric property. In some cases, the results are different depending on the order in which the attributes compared.

For example:

[ a | a <- [ 0, "1" ], a == "" ]

and

[ a | a <- [ 0, "1" ], "" == a ]
ostap commented 11 years ago

Indeed, there is a problem with "" == 0 vs 0 == "".