Implement `Sort` ability for ordering using a `compare` implementation
Sort Ability
See zulip discussion thread for more information.
The Sort Ability defines the compare function, which can be used to compare two values for ordering.
Sort is not derived for Str as working with utf-8 strings which is a variable length encoding scheme is complex and is achived through a dedicated library such as roc-lang/unicode.
Definition of the Sort Ability.
# Sort.roc
Sort implements
compare : a, a -> [LessThan, Equal, GreaterThan] where a implements Sort
Follow-up note from Zulip: for the initial implementation, we should also have F32 and F64 not have the Sort ability (just like how they don't have Eq).
I'm interested in taking a look at this. Can I pick it up?
Absolutely! 😃
Happy to answer any questions you run into!