sortz

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asc

func Asc[T typez.Ordered](a []T)

Asc sorts the given slice in ascending order.

func AscByKey added in v0.0.15

func AscByKey[T any, K typez.Ordered](a []T, keyFn func(T) K)

AscByKey sorts the given slice in ascending order by the key returned by keyFn.

func AscStableByKey added in v0.0.15

func AscStableByKey[T any, K typez.Ordered](a []T, keyFn func(T) K)

AscStableByKey sorts the given slice in ascending order by the key returned by keyFn.

func Desc

func Desc[T typez.Ordered](d []T)

Desc sorts the given slice in descending order.

func DescByKey added in v0.0.15

func DescByKey[T any, K typez.Ordered](d []T, keyFn func(T) K)

DescByKey sorts the given slice in descending order by the key returned by keyFn.

func DescStableByKey added in v0.0.15

func DescStableByKey[T any, K typez.Ordered](d []T, keyFn func(T) K)

DescStableByKey sorts the given slice in descending order by the key returned by keyFn.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL