The following Dicts are equal despite the fact that their entries are not in the same order. That's perfect.
However, when they're inside a record, the records are not equal.
» Dict.from_list([("Bob", 3.1), ("John", 4.2)]) == Dict.from_list([("John", 4.2), ("Bob", 3.1)])
True
» {owes: Dict.from_list([("Bob", 3.1), ("John", 4.2)])} == {owes: Dict.from_list([("John", 4.2), ("Bob", 3.1)])}
False
Edit: the example is probably easier to read like this:
» d1 = Dict.from_list([("Bob", 3.1), ("John", 4.2)])
assigned `d1`
» d2 = Dict.from_list([("John", 4.2), ("Bob", 3.1)])
assigned `d2`
» d1 == d2
True
» {owes: d1} == {owes: d2}
False
The following Dicts are equal despite the fact that their entries are not in the same order. That's perfect.
However, when they're inside a record, the records are not equal.
Edit: the example is probably easier to read like this: