keen/compare
SourceThis is a standard module
and does not need to be explicitly imported.
comparison enumlessequalgreaterResult of comparison.
If a <=> b is equal, then any function on a should return ths same result as a on b.
equal[t] speccompare[t] spec t equalWhen defined for mutable values, this should compare their content without regard to mutablility; so it may consider values equal that may not be equal in the future.
compare-reverse[t] recordinner tWraps a value and reverses comparison (so less becomes greater and vice versa)
Functions for comparison.
If you want a type to be comparable, just define
==and<=>. Use the signatures defined in thecomparespec.Other functions like
!=are defined here, derived from those.