Documentation
¶
Overview ¶
morecmp implements extensions to the standard cmp library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmpFunc ¶
CmpFunc is a convience that represents the comparison functions used by APIs like slices.SortFunc.
func ComparingFunc ¶
Comparing creates a CmpFunc that compares Ts by first converting them into Es, then then checking those Es with the provided CmpFunc.
func FalseFirst ¶
FalseFirst returns a CmpFunc[bool] that sorts false before true.
func (CmpFunc[T]) AndThen ¶
AndThen returns a new CmpFunc that first checks this CmpFunc, and if the comparison is zero, checks the next CmpFuncs in order.
Click to show internal directories.
Click to hide internal directories.