Documentation ¶
Index ¶
- Constants
- type Iterator
- type Map
- func (m Map[K, V]) Add(k K, v V) (success bool)
- func (m Map[K, V]) Clear()
- func (m Map[K, V]) Combine(other Map[K, V]) (success int)
- func (di Map) Filter(f func(val T) bool) Iterator[T]
- func (m Map[K, V]) Get(k K, def ...V) (V, bool)
- func (m Map[K, V]) Keys() *Slice[K]
- func (di Map) Map(f func(val T) T) Iterator[T]
- func (m Map[K, V]) Range(fn func(p Pairs[K, V]) bool)
- func (di Map) Reduce(f func(previousValue any, val T) any, initialValue any) any
- func (m Map[K, V]) Remove(k K) V
- func (di Map) Slice() *Slice[T]
- func (m Map[K, V]) Update(k K, v V) (old V)
- func (m Map[K, V]) Values() []V
- type MapSet
- func (s MapSet[T]) Add(member T)
- func (s MapSet[T]) Clear()
- func (s MapSet[T]) Combine(other MapSet[T]) (success int)
- func (s MapSet[T]) IsMember(member T) (ok bool)
- func (s MapSet[T]) Len() int
- func (s MapSet[T]) Members() *Slice[T]
- func (s MapSet[T]) Pop() (ret T)
- func (s MapSet[T]) Rand() (ret T)
- func (s MapSet[T]) Remove(member T)
- type Pairs
- type Ranger
- type Slice
- func (s *Slice[T]) Append(ele ...T)
- func (s *Slice[T]) At(index int) (ret T, err error)
- func (s *Slice[T]) Clear()
- func (di Slice) Filter(f func(val T) bool) Iterator[T]
- func (s *Slice[T]) Find(fn func(ele T) bool) bool
- func (s *Slice[T]) FindIndex(fn func(ele T) bool) int
- func (s *Slice[T]) Insert(index int, ele ...T) error
- func (s *Slice[T]) Length() int
- func (di Slice) Map(f func(val T) T) Iterator[T]
- func (s *Slice[T]) Range(fn func(val T) bool)
- func (di Slice) Reduce(f func(previousValue any, val T) any, initialValue any) any
- func (s *Slice[T]) Remove(index int) error
- func (di Slice) Slice() *Slice[T]
- func (s *Slice[T]) Source() []T
- func (s *Slice[T]) Update(index int, ele T) error
Constants ¶
View Source
const ( IterTypeNone = iota IterTypeFilter IterTypeMap )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func NewMap ¶
func NewMap[K comparable, V comparable]() *Map[K, V]
type MapSet ¶
type MapSet[T comparable] map[T]struct{}
func NewMapSet ¶
func NewMapSet[T comparable]() MapSet[T]
type Pairs ¶
type Pairs[K comparable, V any] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.