You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that some parts of the code could be simplified by passing a compare function with @spec compare(data, data) :: :lt | :eq | :gt when data: var instead of order and eq.
The text was updated successfully, but these errors were encountered:
Yes. If order and eq are both lawful, then the information contained in compare is the same.
The only case for keeping order and eq around I can think of is non-lawful ones, e.g. when eq(x,y) does not imply order(x, y) && order(y, x). But I'd argue that such situations are confusing anyways and should be worked around in a different way (e.g. using #10 or #8).
I think that some parts of the code could be simplified by passing a
compare
function with@spec compare(data, data) :: :lt | :eq | :gt when data: var
instead oforder
andeq
.The text was updated successfully, but these errors were encountered: