Documentation
ΒΆ
Index ΒΆ
- func Assign[K comparable, V any](maps ...map[K]V) map[K]V
- func Async[A any](f func() A) chan A
- func Async0(f func()) chan struct{}
- func Async1[A any](f func() A) chan A
- func Async2[A any, B any](f func() (A, B)) chan Tuple2[A, B]
- func Async3[A any, B any, C any](f func() (A, B, C)) chan Tuple3[A, B, C]
- func Async4[A any, B any, C any, D any](f func() (A, B, C, D)) chan Tuple4[A, B, C, D]
- func Async5[A any, B any, C any, D any, E any](f func() (A, B, C, D, E)) chan Tuple5[A, B, C, D, E]
- func Async6[A any, B any, C any, D any, E any, F any](f func() (A, B, C, D, E, F)) chan Tuple6[A, B, C, D, E, F]
- func Attempt(maxIteration int, f func(int) error) (int, error)
- func AttemptWithDelay(maxIteration int, delay time.Duration, f func(int, time.Duration) error) (int, time.Duration, error)
- func Chunk[T any](collection []T, size int) [][]T
- func Clamp[T constraints.Ordered](value T, min T, max T) T
- func Coalesce[T comparable](v ...T) (result T, ok bool)
- func Contains[T comparable](collection []T, element T) bool
- func ContainsBy[T any](collection []T, predicate func(T) bool) bool
- func Count[T comparable](collection []T, value T) (count int)
- func CountBy[T any](collection []T, predicate func(T) bool) (count int)
- func Difference[T comparable](list1 []T, list2 []T) ([]T, []T)
- func Drop[T any](collection []T, n int) []T
- func DropRight[T any](collection []T, n int) []T
- func DropRightWhile[T any](collection []T, predicate func(T) bool) []T
- func DropWhile[T any](collection []T, predicate func(T) bool) []T
- func Empty[T any]() T
- func Every[T comparable](collection []T, subset []T) bool
- func EveryBy[V any](collection []V, predicate func(V) bool) bool
- func Fill[T Clonable[T]](collection []T, initial T) []T
- func Filter[V any](collection []V, predicate func(V, int) bool) []V
- func FilterMap[T any, R any](collection []T, callback func(T, int) (R, bool)) []R
- func Find[T any](collection []T, predicate func(T) bool) (T, bool)
- func FindIndexOf[T any](collection []T, predicate func(T) bool) (T, int, bool)
- func FindLastIndexOf[T any](collection []T, predicate func(T) bool) (T, int, bool)
- func FindOrElse[T any](collection []T, fallback T, predicate func(T) bool) T
- func FlatMap[T any, R any](collection []T, iteratee func(T, int) []R) []R
- func Flatten[T any](collection [][]T) []T
- func ForEach[T any](collection []T, iteratee func(T, int))
- func FromAnySlice[T any](in []any) (out []T, ok bool)
- func FromEntries[K comparable, V any](entries []Entry[K, V]) map[K]V
- func GroupBy[T any, U comparable](collection []T, iteratee func(T) U) map[U][]T
- func If[T any](condition bool, result T) *ifElse[T]
- func IfF[T any](condition bool, resultF func() T) *ifElse[T]
- func IndexOf[T comparable](collection []T, element T) int
- func Intersect[T comparable](list1 []T, list2 []T) []T
- func Invert[K comparable, V comparable](in map[K]V) map[V]K
- func KeyBy[K comparable, V any](collection []V, iteratee func(V) K) map[K]V
- func Keys[K comparable, V any](in map[K]V) []K
- func Last[T any](collection []T) (T, error)
- func LastIndexOf[T comparable](collection []T, element T) int
- func Map[T any, R any](collection []T, iteratee func(T, int) R) []R
- func MapKeys[K comparable, V any, R comparable](in map[K]V, iteratee func(V, K) R) map[R]V
- func MapValues[K comparable, V any, R any](in map[K]V, iteratee func(V, K) R) map[K]R
- func Max[T constraints.Ordered](collection []T) T
- func MaxBy[T any](collection []T, comparison func(T, T) bool) T
- func Min[T constraints.Ordered](collection []T) T
- func MinBy[T any](collection []T, comparison func(T, T) bool) T
- func Must[T any](val T, err any) T
- func Must0(err any)
- func Must1[T any](val T, err any) T
- func Must2[T1 any, T2 any](val1 T1, val2 T2, err any) (T1, T2)
- func Must3[T1 any, T2 any, T3 any](val1 T1, val2 T2, val3 T3, err any) (T1, T2, T3)
- func Must4[T1 any, T2 any, T3 any, T4 any](val1 T1, val2 T2, val3 T3, val4 T4, err any) (T1, T2, T3, T4)
- func Must5[T1 any, T2 any, T3 any, T4 any, T5 any](val1 T1, val2 T2, val3 T3, val4 T4, val5 T5, err any) (T1, T2, T3, T4, T5)
- func Must6[T1 any, T2 any, T3 any, T4 any, T5 any, T6 any](val1 T1, val2 T2, val3 T3, val4 T4, val5 T5, val6 T6, err any) (T1, T2, T3, T4, T5, T6)
- func NewDebounce(duration time.Duration, f ...func()) (func(), func())
- func None[V comparable](collection []V, subset []V) bool
- func NoneBy[V any](collection []V, predicate func(V) bool) bool
- func Nth[T any](collection []T, nth int) (T, error)
- func OmitBy[K comparable, V any](in map[K]V, predicate func(K, V) bool) map[K]V
- func OmitByKeys[K comparable, V any](in map[K]V, keys []K) map[K]V
- func OmitByValues[K comparable, V comparable](in map[K]V, values []V) map[K]V
- func PartitionBy[T any, K comparable](collection []T, iteratee func(x T) K) [][]T
- func PickBy[K comparable, V any](in map[K]V, predicate func(K, V) bool) map[K]V
- func PickByKeys[K comparable, V any](in map[K]V, keys []K) map[K]V
- func PickByValues[K comparable, V comparable](in map[K]V, values []V) map[K]V
- func Range(elementNum int) []int
- func RangeFrom[T constraints.Integer | constraints.Float](start T, elementNum int) []T
- func RangeWithSteps[T constraints.Integer | constraints.Float](start, end, step T) []T
- func Reduce[T any, R any](collection []T, accumulator func(R, T, int) R, initial R) R
- func Reject[V any](collection []V, predicate func(V, int) bool) []V
- func Repeat[T Clonable[T]](count int, initial T) []T
- func RepeatBy[T any](count int, predicate func(int) T) []T
- func Replace[T comparable](collection []T, old T, new T, n int) []T
- func ReplaceAll[T comparable](collection []T, old T, new T) []T
- func Reverse[T any](collection []T) []T
- func RuneLength(str string) int
- func Sample[T any](collection []T) T
- func Samples[T any](collection []T, count int) []T
- func Shuffle[T any](collection []T) []T
- func Some[T comparable](collection []T, subset []T) bool
- func SomeBy[V any](collection []V, predicate func(V) bool) bool
- func Subset[T any](collection []T, offset int, length uint) []T
- func Substring[T ~string](str T, offset int, length uint) T
- func SumBy[T any, R constraints.Float | constraints.Integer](collection []T, iteratee func(T) R) R
- func Switch[T comparable, R any](predicate T) *switchCase[T, R]
- func Synchronize(opt ...sync.Locker) *synchronize
- func Ternary[T any](condition bool, ifOutput T, elseOutput T) T
- func Times[T any](count int, iteratee func(int) T) []T
- func ToAnySlice[T any](collection []T) []any
- func ToPtr[T any](x T) *T
- func ToSlicePtr[T any](collection []T) []*T
- func Try(callback func() error) (ok bool)
- func Try0(callback func()) bool
- func Try1[T any](callback func() error) bool
- func Try2[T any](callback func() (T, error)) bool
- func Try3[T, R any](callback func() (T, R, error)) bool
- func Try4[T, R, S any](callback func() (T, R, S, error)) bool
- func Try5[T, R, S, Q any](callback func() (T, R, S, Q, error)) bool
- func Try6[T, R, S, Q, U any](callback func() (T, R, S, Q, U, error)) bool
- func TryCatch(callback func() error, catch func())
- func TryCatchWithErrorValue(callback func() error, catch func(any))
- func TryWithErrorValue(callback func() error) (errorValue any, ok bool)
- func Union[T comparable](list1 []T, list2 []T) []T
- func Uniq[T comparable](collection []T) []T
- func UniqBy[T any, U comparable](collection []T, iteratee func(T) U) []T
- func Unpack2[A any, B any](tuple Tuple2[A, B]) (A, B)
- func Unpack3[A any, B any, C any](tuple Tuple3[A, B, C]) (A, B, C)
- func Unpack4[A any, B any, C any, D any](tuple Tuple4[A, B, C, D]) (A, B, C, D)
- func Unpack5[A any, B any, C any, D any, E any](tuple Tuple5[A, B, C, D, E]) (A, B, C, D, E)
- func Unpack6[A any, B any, C any, D any, E any, F any](tuple Tuple6[A, B, C, D, E, F]) (A, B, C, D, E, F)
- func Unpack7[A any, B any, C any, D any, E any, F any, G any](tuple Tuple7[A, B, C, D, E, F, G]) (A, B, C, D, E, F, G)
- func Unpack8[A any, B any, C any, D any, E any, F any, G any, H any](tuple Tuple8[A, B, C, D, E, F, G, H]) (A, B, C, D, E, F, G, H)
- func Unpack9[A any, B any, C any, D any, E any, F any, G any, H any, I any](tuple Tuple9[A, B, C, D, E, F, G, H, I]) (A, B, C, D, E, F, G, H, I)
- func Unzip2[A any, B any](tuples []Tuple2[A, B]) ([]A, []B)
- func Unzip3[A any, B any, C any](tuples []Tuple3[A, B, C]) ([]A, []B, []C)
- func Unzip4[A any, B any, C any, D any](tuples []Tuple4[A, B, C, D]) ([]A, []B, []C, []D)
- func Unzip5[A any, B any, C any, D any, E any](tuples []Tuple5[A, B, C, D, E]) ([]A, []B, []C, []D, []E)
- func Unzip6[A any, B any, C any, D any, E any, F any](tuples []Tuple6[A, B, C, D, E, F]) ([]A, []B, []C, []D, []E, []F)
- func Unzip7[A any, B any, C any, D any, E any, F any, G any](tuples []Tuple7[A, B, C, D, E, F, G]) ([]A, []B, []C, []D, []E, []F, []G)
- func Unzip8[A any, B any, C any, D any, E any, F any, G any, H any](tuples []Tuple8[A, B, C, D, E, F, G, H]) ([]A, []B, []C, []D, []E, []F, []G, []H)
- func Unzip9[A any, B any, C any, D any, E any, F any, G any, H any, I any](tuples []Tuple9[A, B, C, D, E, F, G, H, I]) ([]A, []B, []C, []D, []E, []F, []G, []H, []I)
- func Values[K comparable, V any](in map[K]V) []V
- type Clonable
- type Entry
- type Tuple2
- type Tuple3
- type Tuple4
- type Tuple5
- type Tuple6
- type Tuple7
- type Tuple8
- type Tuple9
- func T9[A any, B any, C any, D any, E any, F any, G any, H any, I any](a A, b B, c C, d D, e E, f F, g G, h H, i I) Tuple9[A, B, C, D, E, F, G, H, I]
- func Zip9[A any, B any, C any, D any, E any, F any, G any, H any, I any](a []A, b []B, c []C, d []D, e []E, f []F, g []G, h []H, i []I) []Tuple9[A, B, C, D, E, F, G, H, I]
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func Assign ΒΆ
func Assign[K comparable, V any](maps ...map[K]V) map[K]V
Assign merges multiple maps from left to right.
func Async ΒΆ
func Async[A any](f func() A) chan A
Async executes a function in a goroutine and returns the result in a channel.
func Async0 ΒΆ
func Async0(f func()) chan struct{}
Async0 executes a function in a goroutine and returns a channel set once the function finishes.
func Async2 ΒΆ
Async2 has the same behavior as Async, but returns the 2 results as a tuple inside the channel.
func Async3 ΒΆ
Async3 has the same behavior as Async, but returns the 3 results as a tuple inside the channel.
func Async4 ΒΆ
Async4 has the same behavior as Async, but returns the 4 results as a tuple inside the channel.
func Async5 ΒΆ
Async5 has the same behavior as Async, but returns the 5 results as a tuple inside the channel.
func Async6 ΒΆ
func Async6[A any, B any, C any, D any, E any, F any](f func() (A, B, C, D, E, F)) chan Tuple6[A, B, C, D, E, F]
Async6 has the same behavior as Async, but returns the 6 results as a tuple inside the channel.
func Attempt ΒΆ
Attempt invokes a function N times until it returns valid output. Returning either the caught error or nil. When first argument is less than `1`, the function runs until a successful response is returned.
func AttemptWithDelay ΒΆ
func AttemptWithDelay(maxIteration int, delay time.Duration, f func(int, time.Duration) error) (int, time.Duration, error)
AttemptWithDelay invokes a function N times until it returns valid output, with a pause betwwen each call. Returning either the caught error or nil. When first argument is less than `1`, the function runs until a sucessfull response is returned.
func Chunk ΒΆ
Chunk returns an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
func Clamp ΒΆ
func Clamp[T constraints.Ordered](value T, min T, max T) T
Clamp clamps number within the inclusive lower and upper bounds.
func Coalesce ΒΆ
func Coalesce[T comparable](v ...T) (result T, ok bool)
Coalesce returns the first non-empty arguments. Arguments must be comparable.
func Contains ΒΆ
func Contains[T comparable](collection []T, element T) bool
Contains returns true if an element is present in a collection.
func ContainsBy ΒΆ
ContainsBy returns true if predicate function return true.
func Count ΒΆ
func Count[T comparable](collection []T, value T) (count int)
Count counts the number of elements in the collection that compare equal to value.
func CountBy ΒΆ
CountBy counts the number of elements in the collection for which predicate is true.
func Difference ΒΆ
func Difference[T comparable](list1 []T, list2 []T) ([]T, []T)
Difference returns the difference between two collections. The first value is the collection of element absent of list2. The second value is the collection of element absent of list1.
func DropRightWhile ΒΆ
DropRightWhile drops elements from the end of a slice or array while the predicate returns true.
func DropWhile ΒΆ
DropWhile drops elements from the beginning of a slice or array while the predicate returns true.
func Every ΒΆ
func Every[T comparable](collection []T, subset []T) bool
Every returns true if all elements of a subset are contained into a collection or if the subset is empty.
func EveryBy ΒΆ
EveryBy returns true if the predicate returns true for all of the elements in the collection or if the collection is empty.
func Fill ΒΆ
func Fill[T Clonable[T]](collection []T, initial T) []T
Fill fills elements of array with `initial` value.
func Filter ΒΆ
Filter iterates over elements of collection, returning an array of all elements predicate returns truthy for.
func FilterMap ΒΆ
FilterMap returns a slice which obtained after both filtering and mapping using the given callback function. The callback function should return two values:
- the result of the mapping operation and
- whether the result element should be included or not.
func Find ΒΆ
Find search an element in a slice based on a predicate. It returns element and true if element was found.
func FindIndexOf ΒΆ
FindIndexOf searches an element in a slice based on a predicate and returns the index and true. It returns -1 and false if the element is not found.
func FindLastIndexOf ΒΆ
FindLastIndexOf searches last element in a slice based on a predicate and returns the index and true. It returns -1 and false if the element is not found.
func FindOrElse ΒΆ
FindOrElse search an element in a slice based on a predicate. It returns the element if found or a given fallback value otherwise.
func FlatMap ΒΆ
FlatMap manipulates a slice and transforms and flattens it to a slice of another type.
func Flatten ΒΆ
func Flatten[T any](collection [][]T) []T
Flatten returns an array a single level deep.
func FromAnySlice ΒΆ
FromAnySlice returns an `any` slice with all elements mapped to a type. Returns false in case of type conversion failure.
func FromEntries ΒΆ
func FromEntries[K comparable, V any](entries []Entry[K, V]) map[K]V
FromEntries transforms an array of key/value pairs into a map.
func GroupBy ΒΆ
func GroupBy[T any, U comparable](collection []T, iteratee func(T) U) map[U][]T
GroupBy returns an object composed of keys generated from the results of running each element of collection through iteratee.
func IndexOf ΒΆ
func IndexOf[T comparable](collection []T, element T) int
IndexOf returns the index at which the first occurrence of a value is found in an array or return -1 if the value cannot be found.
func Intersect ΒΆ
func Intersect[T comparable](list1 []T, list2 []T) []T
Intersect returns the intersection between two collections.
func Invert ΒΆ
func Invert[K comparable, V comparable](in map[K]V) map[V]K
Invert creates a map composed of the inverted keys and values. If map contains duplicate values, subsequent values overwrite property assignments of previous values.
func KeyBy ΒΆ
func KeyBy[K comparable, V any](collection []V, iteratee func(V) K) map[K]V
KeyBy transforms a slice or an array of structs to a map based on a pivot callback.
func LastIndexOf ΒΆ
func LastIndexOf[T comparable](collection []T, element T) int
LastIndexOf returns the index at which the last occurrence of a value is found in an array or return -1 if the value cannot be found.
func MapKeys ΒΆ
func MapKeys[K comparable, V any, R comparable](in map[K]V, iteratee func(V, K) R) map[R]V
MapKeys manipulates a map keys and transforms it to a map of another type.
func MapValues ΒΆ
func MapValues[K comparable, V any, R any](in map[K]V, iteratee func(V, K) R) map[K]R
MapValues manipulates a map values and transforms it to a map of another type.
func Max ΒΆ
func Max[T constraints.Ordered](collection []T) T
Max searches the maximum value of a collection.
func MaxBy ΒΆ
MaxBy search the maximum value of a collection using the given comparison function. If several values of the collection are equal to the greatest value, returns the first such value.
func Min ΒΆ
func Min[T constraints.Ordered](collection []T) T
Min search the minimum value of a collection.
func MinBy ΒΆ
MinBy search the minimum value of a collection using the given comparison function. If several values of the collection are equal to the smallest value, returns the first such value.
func Must ΒΆ
Must is a helper that wraps a call to a function returning a value and an error and panics if err is error or false.
func Must0 ΒΆ
func Must0(err any)
Must0 has the same behavior than Must, but callback returns no variable.
func Must4 ΒΆ
func Must4[T1 any, T2 any, T3 any, T4 any](val1 T1, val2 T2, val3 T3, val4 T4, err any) (T1, T2, T3, T4)
Must4 has the same behavior than Must, but callback returns 4 variables.
func Must5 ΒΆ
func Must5[T1 any, T2 any, T3 any, T4 any, T5 any](val1 T1, val2 T2, val3 T3, val4 T4, val5 T5, err any) (T1, T2, T3, T4, T5)
Must5 has the same behavior than Must, but callback returns 5 variables.
func Must6 ΒΆ
func Must6[T1 any, T2 any, T3 any, T4 any, T5 any, T6 any](val1 T1, val2 T2, val3 T3, val4 T4, val5 T5, val6 T6, err any) (T1, T2, T3, T4, T5, T6)
Must6 has the same behavior than Must, but callback returns 6 variables.
func NewDebounce ΒΆ
NewDebounce creates a debounced instance that delays invoking functions given until after wait milliseconds have elapsed.
func None ΒΆ
func None[V comparable](collection []V, subset []V) bool
None returns true if no element of a subset are contained into a collection or if the subset is empty.
func NoneBy ΒΆ
NoneBy returns true if the predicate returns true for none of the elements in the collection or if the collection is empty.
func Nth ΒΆ
Nth returns the element at index `nth` of collection. If `nth` is negative, the nth element from the end is returned. An error is returned when nth is out of slice bounds.
func OmitBy ΒΆ
func OmitBy[K comparable, V any](in map[K]V, predicate func(K, V) bool) map[K]V
PickBy returns same map type filtered by given predicate.
func OmitByKeys ΒΆ
func OmitByKeys[K comparable, V any](in map[K]V, keys []K) map[K]V
OmitByKeys returns same map type filtered by given keys.
func OmitByValues ΒΆ
func OmitByValues[K comparable, V comparable](in map[K]V, values []V) map[K]V
OmitByValues returns same map type filtered by given values.
func PartitionBy ΒΆ
func PartitionBy[T any, K comparable](collection []T, iteratee func(x T) K) [][]T
PartitionBy returns an array of elements split into groups. The order of grouped values is determined by the order they occur in collection. The grouping is generated from the results of running each element of collection through iteratee.
func PickBy ΒΆ
func PickBy[K comparable, V any](in map[K]V, predicate func(K, V) bool) map[K]V
PickBy returns same map type filtered by given predicate.
func PickByKeys ΒΆ
func PickByKeys[K comparable, V any](in map[K]V, keys []K) map[K]V
PickByKeys returns same map type filtered by given keys.
func PickByValues ΒΆ
func PickByValues[K comparable, V comparable](in map[K]V, values []V) map[K]V
PickByValues returns same map type filtered by given values.
func RangeFrom ΒΆ
func RangeFrom[T constraints.Integer | constraints.Float](start T, elementNum int) []T
RangeFrom creates an array of numbers from start with specified length.
func RangeWithSteps ΒΆ
func RangeWithSteps[T constraints.Integer | constraints.Float](start, end, step T) []T
RangeWithSteps creates an array of numbers (positive and/or negative) progressing from start up to, but not including end. step set to zero will return empty array.
func Reduce ΒΆ
Reduce reduces collection to a value which is the accumulated result of running each element in collection through accumulator, where each successive invocation is supplied the return value of the previous.
func Reject ΒΆ
Reject is the opposite of Filter, this method returns the elements of collection that predicate does not return truthy for.
func Replace ΒΆ
func Replace[T comparable](collection []T, old T, new T, n int) []T
Replace returns a copy of the slice with the first n non-overlapping instances of old replaced by new.
func ReplaceAll ΒΆ
func ReplaceAll[T comparable](collection []T, old T, new T) []T
ReplaceAll returns a copy of the slice with all non-overlapping instances of old replaced by new.
func Reverse ΒΆ
func Reverse[T any](collection []T) []T
Reverse reverses array so that the first element becomes the last, the second element becomes the second to last, and so on.
func RuneLength ΒΆ
RuneLength is an alias to utf8.RuneCountInString which returns the number of runes in string.
func Shuffle ΒΆ
func Shuffle[T any](collection []T) []T
Shuffle returns an array of shuffled values. Uses the Fisher-Yates shuffle algorithm.
func Some ΒΆ
func Some[T comparable](collection []T, subset []T) bool
Some returns true if at least 1 element of a subset is contained into a collection. If the subset is empty Some returns false.
func SomeBy ΒΆ
SomeBy returns true if the predicate returns true for any of the elements in the collection. If the collection is empty SomeBy returns false.
func SumBy ΒΆ
func SumBy[T any, R constraints.Float | constraints.Integer](collection []T, iteratee func(T) R) R
Summarizes the values in a collection.
func Switch ΒΆ
func Switch[T comparable, R any](predicate T) *switchCase[T, R]
Switch is a pure functional switch/case/default statement.
func Synchronize ΒΆ
Synchronize wraps the underlying callback in a mutex. It receives an optional mutex.
func Times ΒΆ
Times invokes the iteratee n times, returning an array of the results of each invocation. The iteratee is invoked with index as argument.
func ToAnySlice ΒΆ
ToAnySlice returns a slice with all elements mapped to `any` type
func ToSlicePtr ΒΆ
func ToSlicePtr[T any](collection []T) []*T
ToSlicePtr returns a slice of pointer copy of value.
func Try0 ΒΆ
func Try0(callback func()) bool
Try0 has the same behavior than Try, but callback returns no variable.
func TryCatch ΒΆ
func TryCatch(callback func() error, catch func())
TryCatch has the same behavior than Try, but calls the catch function in case of error.
func TryCatchWithErrorValue ΒΆ
TryCatchWithErrorValue has the same behavior than TryWithErrorValue, but calls the catch function in case of error.
func TryWithErrorValue ΒΆ
TryWithErrorValue has the same behavior than Try, but also returns value passed to panic.
func Union ΒΆ
func Union[T comparable](list1 []T, list2 []T) []T
Union returns all distinct elements from both collections. result returns will not change the order of elements relatively.
func Uniq ΒΆ
func Uniq[T comparable](collection []T) []T
Uniq returns a duplicate-free version of an array, in which only the first occurrence of each element is kept. The order of result values is determined by the order they occur in the array.
func UniqBy ΒΆ
func UniqBy[T any, U comparable](collection []T, iteratee func(T) U) []T
UniqBy returns a duplicate-free version of an array, in which only the first occurrence of each element is kept. The order of result values is determined by the order they occur in the array. It accepts `iteratee` which is invoked for each element in array to generate the criterion by which uniqueness is computed.
func Unpack6 ΒΆ
func Unpack6[A any, B any, C any, D any, E any, F any](tuple Tuple6[A, B, C, D, E, F]) (A, B, C, D, E, F)
Unpack6 returns values contained in tuple.
func Unpack7 ΒΆ
func Unpack7[A any, B any, C any, D any, E any, F any, G any](tuple Tuple7[A, B, C, D, E, F, G]) (A, B, C, D, E, F, G)
Unpack7 returns values contained in tuple.
func Unpack8 ΒΆ
func Unpack8[A any, B any, C any, D any, E any, F any, G any, H any](tuple Tuple8[A, B, C, D, E, F, G, H]) (A, B, C, D, E, F, G, H)
Unpack8 returns values contained in tuple.
func Unpack9 ΒΆ
func Unpack9[A any, B any, C any, D any, E any, F any, G any, H any, I any](tuple Tuple9[A, B, C, D, E, F, G, H, I]) (A, B, C, D, E, F, G, H, I)
Unpack9 returns values contained in tuple.
func Unzip2 ΒΆ
Unzip2 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip3 ΒΆ
Unzip3 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip4 ΒΆ
Unzip4 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip5 ΒΆ
func Unzip5[A any, B any, C any, D any, E any](tuples []Tuple5[A, B, C, D, E]) ([]A, []B, []C, []D, []E)
Unzip5 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip6 ΒΆ
func Unzip6[A any, B any, C any, D any, E any, F any](tuples []Tuple6[A, B, C, D, E, F]) ([]A, []B, []C, []D, []E, []F)
Unzip6 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip7 ΒΆ
func Unzip7[A any, B any, C any, D any, E any, F any, G any](tuples []Tuple7[A, B, C, D, E, F, G]) ([]A, []B, []C, []D, []E, []F, []G)
Unzip7 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip8 ΒΆ
func Unzip8[A any, B any, C any, D any, E any, F any, G any, H any](tuples []Tuple8[A, B, C, D, E, F, G, H]) ([]A, []B, []C, []D, []E, []F, []G, []H)
Unzip8 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip9 ΒΆ
func Unzip9[A any, B any, C any, D any, E any, F any, G any, H any, I any](tuples []Tuple9[A, B, C, D, E, F, G, H, I]) ([]A, []B, []C, []D, []E, []F, []G, []H, []I)
Unzip9 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Values ΒΆ
func Values[K comparable, V any](in map[K]V) []V
Values creates an array of the map values.
Types ΒΆ
type Clonable ΒΆ
type Clonable[T any] interface { Clone() T }
Clonable defines a constraint of types having Clone() T method.
type Entry ΒΆ
type Entry[K comparable, V any] struct { Key K Value V }
Entry defines a key/value pairs.
func Entries ΒΆ
func Entries[K comparable, V any](in map[K]V) []Entry[K, V]
Entries transforms a map into array of key/value pairs.
type Tuple2 ΒΆ
Tuple2 is a group of 2 elements (pair).
type Tuple3 ΒΆ
Tuple3 is a group of 3 elements.
type Tuple4 ΒΆ
Tuple4 is a group of 4 elements.
type Tuple5 ΒΆ
Tuple5 is a group of 5 elements.
func Zip5 ΒΆ
func Zip5[A any, B any, C any, D any, E any](a []A, b []B, c []C, d []D, e []E) []Tuple5[A, B, C, D, E]
Zip5 creates a slice of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. When collections have different size, the Tuple attributes are filled with zero value.
type Tuple6 ΒΆ
Tuple6 is a group of 6 elements.
func T6 ΒΆ
func T6[A any, B any, C any, D any, E any, F any](a A, b B, c C, d D, e E, f F) Tuple6[A, B, C, D, E, F]
T6 creates a tuple from a list of values.
func Zip6 ΒΆ
func Zip6[A any, B any, C any, D any, E any, F any](a []A, b []B, c []C, d []D, e []E, f []F) []Tuple6[A, B, C, D, E, F]
Zip6 creates a slice of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. When collections have different size, the Tuple attributes are filled with zero value.
type Tuple7 ΒΆ
Tuple7 is a group of 7 elements.
func T7 ΒΆ
func T7[A any, B any, C any, D any, E any, F any, G any](a A, b B, c C, d D, e E, f F, g G) Tuple7[A, B, C, D, E, F, G]
T7 creates a tuple from a list of values.
func Zip7 ΒΆ
func Zip7[A any, B any, C any, D any, E any, F any, G any](a []A, b []B, c []C, d []D, e []E, f []F, g []G) []Tuple7[A, B, C, D, E, F, G]
Zip7 creates a slice of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. When collections have different size, the Tuple attributes are filled with zero value.
type Tuple8 ΒΆ
type Tuple8[A any, B any, C any, D any, E any, F any, G any, H any] struct { A A B B C C D D E E F F G G H H }
Tuple8 is a group of 8 elements.
func T8 ΒΆ
func T8[A any, B any, C any, D any, E any, F any, G any, H any](a A, b B, c C, d D, e E, f F, g G, h H) Tuple8[A, B, C, D, E, F, G, H]
T8 creates a tuple from a list of values.
func Zip8 ΒΆ
func Zip8[A any, B any, C any, D any, E any, F any, G any, H any](a []A, b []B, c []C, d []D, e []E, f []F, g []G, h []H) []Tuple8[A, B, C, D, E, F, G, H]
Zip8 creates a slice of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. When collections have different size, the Tuple attributes are filled with zero value.
type Tuple9 ΒΆ
type Tuple9[A any, B any, C any, D any, E any, F any, G any, H any, I any] struct { A A B B C C D D E E F F G G H H I I }
Tuple9 is a group of 9 elements.
func T9 ΒΆ
func T9[A any, B any, C any, D any, E any, F any, G any, H any, I any](a A, b B, c C, d D, e E, f F, g G, h H, i I) Tuple9[A, B, C, D, E, F, G, H, I]
T8 creates a tuple from a list of values.
func Zip9 ΒΆ
func Zip9[A any, B any, C any, D any, E any, F any, G any, H any, I any](a []A, b []B, c []C, d []D, e []E, f []F, g []G, h []H, i []I) []Tuple9[A, B, C, D, E, F, G, H, I]
Zip9 creates a slice of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. When collections have different size, the Tuple attributes are filled with zero value.