Documentation ¶
Index ¶
- func Empty[T comparable](array []T) bool
- func IndexOf[T comparable](array []T, value T) int
- func Unique[T comparable](array []T) []T
- type Array
- func (arr *Array[T]) Empty() bool
- func (arr *Array[T]) Find(f func(val T) bool) (T, bool)
- func (arr *Array[T]) IndexOf(value T) int
- func (arr *Array[T]) Join(sep string) string
- func (arr *Array[T]) Len() int
- func (arr *Array[T]) Map(f func(val T) (T, bool)) []T
- func (arr *Array[T]) Pop() (T, bool)
- func (arr *Array[T]) Push(v T) int
- func (arr *Array[T]) Reverse()
- func (arr *Array[T]) SetValues(values []T)
- func (arr *Array[T]) Unique() []T
- func (arr *Array[T]) Value() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Empty ¶
func Empty[T comparable](array []T) bool
func IndexOf ¶
func IndexOf[T comparable](array []T, value T) int
func Unique ¶ added in v1.22.2
func Unique[T comparable](array []T) []T
Types ¶
type Array ¶
type Array[T comparable] struct { Values []T }
func New ¶ added in v1.22.6
func New[T comparable](v ...T) *Array[T]
Click to show internal directories.
Click to hide internal directories.