Versions in this module Expand all Collapse all v0 v0.2.0 Jan 16, 2024 Changes in this version type Map + func (mp Map[K, V]) Merge(maps ...Map[K, V]) Map[K, V] + func (mp Map[K, V]) MergeConflict(conflictFunc func(V, V) V, maps ...Map[K, V]) Map[K, V] v0.1.0 Nov 13, 2023 Changes in this version + func FirstVal[T any](v ...*T) *T + func GeneratorSimple[T any](size int, genFn func(prev T) (T, bool)) <-chan T + func Generator[T any](ctx context.Context, size int, ...) <-chan T + func MapEqual[T ~map[K]V, K comparable, V comparable](mp, otherMap T) bool + func MapReduce[K comparable, V any, R any](mp map[K]V, reduce func(key K, val V, ret *R)) R + func Max[T constraints.Ordered](x, y T) T + func Min[T constraints.Ordered](x, y T) T + func SliceReduce[T any, R any](sl []T, reduce func(val T, ret *R)) R + func SliceUnique[T comparable](sl []T) []T + type LazySlice struct + func NewLazySlice[T any](sl []T) *LazySlice[T] + func (sl *LazySlice[T]) Apply(apply func(val T) T) *LazySlice[T] + func (sl *LazySlice[T]) Commit() Slice[T] + func (sl *LazySlice[T]) Each(iter func(val T)) *LazySlice[T] + func (sl *LazySlice[T]) Filter(filter func(val T) bool) *LazySlice[T] + type Map map[K]V + func MapApply[K comparable, V any, NK comparable, NV any](mp map[K]V, apply func(key K, val V) (NK, NV)) Map[NK, NV] + func (mp Map[K, V]) Apply(apply func(key K, val V) (K, V)) Map[K, V] + func (mp Map[K, V]) Copy() Map[K, V] + func (mp Map[K, V]) Each(iter func(key K, val V)) Map[K, V] + func (mp Map[K, V]) Filter(filter func(key K, val V) bool) Map[K, V] + func (mp Map[K, V]) Keys() Slice[K] + func (mp Map[K, V]) ReduceIntoOne(reduce func(key K, val V, ret *V)) V + func (mp Map[K, V]) Set(key K, val V) Map[K, V] + func (mp Map[K, V]) Values() Slice[V] + type Slice []T + func SliceApply[T any, N any](sl []T, apply func(val T) N) Slice[N] + func (sl Slice[T]) Append(val T) Slice[T] + func (sl Slice[T]) Apply(apply func(val T) T) Slice[T] + func (sl Slice[T]) BinarySearch(fn func(val T) bool) int + func (sl Slice[T]) Copy() Slice[T] + func (sl Slice[T]) Each(iter func(val T)) Slice[T] + func (sl Slice[T]) Filter(filter func(val T) bool) Slice[T] + func (sl Slice[T]) First() *T + func (sl Slice[T]) FirstOr(def T) T + func (sl Slice[T]) Has(fn func(val T) bool) bool + func (sl Slice[T]) IndexOf(fn func(val T) bool) int + func (sl Slice[T]) Last() *T + func (sl Slice[T]) LastOr(def T) T + func (sl Slice[T]) Len() int + func (sl Slice[T]) Prepend(val T) Slice[T] + func (sl Slice[T]) ReduceIntoOne(apply func(val T, ret *T)) T + func (sl Slice[T]) RemoveAt(i int) Slice[T] + func (sl Slice[T]) RemoveRange(i, j int) Slice[T] + func (sl Slice[T]) Sort(cmp func(a, b T) bool) Slice[T] + func (sl Slice[T]) ValueOr(i int, def T) T