sort

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package sort provides sorting in place slice elements

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func By added in v0.0.6

func By[T any, o constraints.Ordered, TS ~[]T](elements TS, by func(T) o) TS

By sorts elements in place by converting them to Ordered values and applying the operator <

func ByLess added in v0.0.6

func ByLess[T any, TS ~[]T](elements TS, less slice.Less[T]) TS

ByLess sorts elements in place using a function that checks if an element is smaller than the others

func Of

func Of[T constraints.Ordered, TS ~[]T](elements TS) TS

Of sorts orderable elements

Types

This section is empty.

Jump to

Keyboard shortcuts

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