sort

package
v0.0.0-...-cf38f87 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortTs

func SortTs(s []T, less func(i, j int) bool)

SortTs sorts the provided slice given the provided less function. The sort is not guaranteed to be stable. For a stable sort, use StableSortTs. For reverse sort, return j < i.

func StableSortTs

func StableSortTs(s []T, less func(i, j int) bool)

StableSortTs sorts the provided slice given the provided less function while keeping the original order of equal elements. For reverse sort, return j < i.

func TsAreSorted

func TsAreSorted(s []T, less func(i, j int) bool) bool

TsAreSorted tests whether a slice is sorted. For reverse sort, return j < i.

Types

type T

type T interface{}

Directories

Path Synopsis
sort is copied from stdlib, most functions made public to support generic sorters.
sort is copied from stdlib, most functions made public to support generic sorters.

Jump to

Keyboard shortcuts

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