arrays and lists have different comparison rules, I prefer list comparison rules, why their comparison rules are different, I always thought they were the same. Maybe it's not an bug, it's a feature.
Repro steps
Here's the same data, saved in an array and placed in a set. The another is saved with a list and placed in set.
// this is order for list, top smallest
let ls = set [
["";"a"];
["a"];
]
// this is order for array, top smallest
let ar = set [
[|"a"|];
[|"";"a"|];
]
Expected behavior
The comparison rule for array should be the same as comparison rule for list. Because arrays and lists logically represent the same data structure, they are sequences of data elements, and they should behave the same way.
Actual behavior
The comparison rule for array and list are different
Known workarounds
Replace the array with a list When using the comparison feature
arrays and lists have different comparison rules, I prefer list comparison rules, why their comparison rules are different, I always thought they were the same. Maybe it's not an bug, it's a feature.
Repro steps
Here's the same data, saved in an array and placed in a set. The another is saved with a list and placed in set.
Expected behavior
The comparison rule for array should be the same as comparison rule for list. Because arrays and lists logically represent the same data structure, they are sequences of data elements, and they should behave the same way.
Actual behavior
The comparison rule for array and list are different
Known workarounds
Replace the array with a list When using the comparison feature