Documentation ¶
Index ¶
- Variables
- func ArrToMap[K Hashable, T, U any](source []T, mapper func(T, int) (K, U)) map[K]U
- func Concat[T any](sources ...[]T) []T
- func Contains[T comparable](source []T, target T) bool
- func Exist[T any](source []T, mapper func(T) bool) bool
- func ExistMap[K Hashable, T any](source map[K]T, mapper func(K, T) bool) bool
- func Filter[T any](source []T, mapper func(T) bool) []T
- func FilterMap[K Hashable, T any](source map[K]T, mapper func(K, T) bool) map[K]T
- func Index[T any](source []T, mapper func(T) bool) int
- func Map[T, U any](source []T, mapper func(T) U) []U
- func MapContains[T any, U comparable](source []T, mapper func(T) U, target U) bool
- func MapToArr[K Hashable, T any](source map[K]T) []T
- func MapToArrMap[K Hashable, T, U any](source map[K]T, mapper func(K, T) U) []U
- func Max[T Integer](a ...T) T
- func Min[T Integer](a ...T) T
- func SafeIndex[T any](arr []*T, idx int) *T
- func Uniq[T any, H Hashable](source []T, mapper func(T) H) []T
- func WithIn[T Integer](t, a, b T) T
- func WithInDefault[T Integer](t, a, b, defaultValue T) T
- type AsyncArr
- func (aa *AsyncArr[T]) Del(idx int) *T
- func (aa *AsyncArr[T]) ForEach() []T
- func (aa *AsyncArr[T]) Get(idx int) (*T, bool)
- func (aa *AsyncArr[T]) Len() int
- func (aa *AsyncArr[T]) MustGet(idx int) *T
- func (aa *AsyncArr[T]) Push(val T)
- func (aa *AsyncArr[T]) Set(idx int, val T) bool
- func (aa *AsyncArr[T]) Take(idx int) *T
- type AsyncMap
- type Hashable
- type Integer
- type Ordered
- type Set
Constants ¶
This section is empty.
Variables ¶
View Source
var X = fmt.Sprintf
Functions ¶
func Contains ¶
func Contains[T comparable](source []T, target T) bool
func MapContains ¶
func MapContains[T any, U comparable](source []T, mapper func(T) U, target U) bool
func MapToArrMap ¶
func WithInDefault ¶
func WithInDefault[T Integer](t, a, b, defaultValue T) T
Types ¶
type AsyncArr ¶
type AsyncArr[T any] struct { // contains filtered or unexported fields }
func NewAsyncArr ¶
type AsyncMap ¶
func NewAsyncMap ¶
Click to show internal directories.
Click to hide internal directories.