Documentation ¶
Index ¶
- func Clone[T any](ts []T) []T
- func Contains[T comparable](ts []T, t T) bool
- func ContainsFunc[T any](ts []T, match func(mt T) bool) bool
- func Dedup[T comparable](ts []T) []T
- func DedupFunc[T any](ts []T, eq func(t1, t2 T) bool) []T
- func DeleteFirst[T comparable](ts []T, t T) []T
- func DeleteIdx[T comparable](ts []T, i int) []T
- func Equal[T comparable](ts1 []T, ts2 []T) bool
- func Find[T comparable](ts []T, t T) int
- func FindFunc[T any](ts []T, match func(mt T) bool) int
- func Insert[T any](ts []T, t T, atIdx int) []T
- func Repeat[T any](t T, count int) []T
- func Reverse[T any](ts []T) []T
- func Sort[T constraints.Ordered](ts []T)
- func Sum[T Number](ts []T) T
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](ts []T, t T) bool
func ContainsFunc ¶
func Dedup ¶
func Dedup[T comparable](ts []T) []T
func DeleteFirst ¶
func DeleteFirst[T comparable](ts []T, t T) []T
func DeleteIdx ¶
func DeleteIdx[T comparable](ts []T, i int) []T
func Equal ¶
func Equal[T comparable](ts1 []T, ts2 []T) bool
func Find ¶
func Find[T comparable](ts []T, t T) int
func Sort ¶
func Sort[T constraints.Ordered](ts []T)
Types ¶
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
Click to show internal directories.
Click to hide internal directories.