withNoneAsLeast
Returns an Order context for elements wrapped in Maybe where None is considered the least value.
In the resulting order:
Two None values are considered equal.
A None value is considered less than any initial value wrapped in Some.
Two non-None values are compared using this order context and their inner values.
Receiver
The order context for initial elements.
Return
An Order instance where None is treated as the minimum value and Some values are treated as their inner initial values.
Type Parameters
The element type for which to create the Maybe order context.
Returns a Comparator for elements wrapped in Maybe where None is considered the least value.
In the resulting comparator:
Two None values are considered equal.
A None value is considered less than any initial value wrapped in Some.
Two non-None values are compared using this comparator and their inner values.
Receiver
The comparator for initial elements.
Return
A Comparator instance where None is treated as the minimum value and Some values are treated as their inner initial values.
Type Parameters
The element type for which to create the Maybe comparator.