Home | History | Annotate | Download | only in sort

Lines Matching defs:Slice

11 // Slice sorts the provided slice given the provided less function.
16 // The function panics if the provided interface is not a slice.
17 func Slice(slice interface{}, less func(i, j int) bool) {
18 rv := reflect.ValueOf(slice)
19 swap := reflect.Swapper(slice)
24 // SliceStable sorts the provided slice given the provided less
27 // The function panics if the provided interface is not a slice.
28 func SliceStable(slice interface{}, less func(i, j int) bool) {
29 rv := reflect.ValueOf(slice)
30 swap := reflect.Swapper(slice)
34 // SliceIsSorted tests whether a slice is sorted.
36 // The function panics if the provided interface is not a slice.
37 func SliceIsSorted(slice interface{}, less func(i, j int) bool) bool {
38 rv := reflect.ValueOf(slice)