Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ordered ¶
func Ordered[O constraints.Ordered](elems []O)
Example ¶
ExampleOrdered is an example function.
package main import ( "fmt" "github.com/xuender/kit/sorts" ) func main() { ints := []int{2, 1, 5, 4, 3} sorts.Ordered(ints) fmt.Println(ints) uint32s := []uint32{2, 1, 5, 4, 3} sorts.Ordered(uint32s) fmt.Println(uint32s) floats := []float32{2.2, 1.1, 5.5, 4.4, 3.3} sorts.Ordered(floats) fmt.Println(floats) }
Output: [1 2 3 4 5] [1 2 3 4 5] [1.1 2.2 3.3 4.4 5.5]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.