Documentation
ΒΆ
Index ΒΆ
- func Assign[K comparable, V any](maps ...map[K]V) map[K]V
- func Async[T any](f func() T) chan T
- func Attempt(maxIteration int, f func(int) error) (int, 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 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 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 error) T
- func Must0(err error)
- func Must1[T any](val T, err error) T
- func Must2[T1 any, T2 any](val1 T1, val2 T2, err error) (T1, T2)
- func Must3[T1 any, T2 any, T3 any](val1 T1, val2 T2, val3 T3, err error) (T1, T2, T3)
- func Must4[T1 any, T2 any, T3 any, T4 any](val1 T1, val2 T2, val3 T3, val4 T4, err error) (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 error) (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 error) (T1, T2, T3, T4, T5, T6)
- func NewDebounce(duration time.Duration, f ...func()) (func(), func())
- 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 Reverse[T any](collection []T) []T
- 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 Switch[T comparable, R any](predicate T) *switchCase[T, R]
- func Ternary[T any](condition bool, ifOutput T, elseOutput T) T
- func Times[T any](count int, iteratee func(int) T) []T
- func ToPtr[T any](x T) *T
- func ToSlicePtr[T any](collection []T) []*T
- func Try(callback func() error) (ok bool)
- func Try0[T any](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 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 ΒΆ added in v1.12.0
func Async[T any](f func() T) chan T
Async executes a function in a goroutine and returns the result in a channel.
func Attempt ΒΆ added in v1.5.0
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 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 ΒΆ added in v1.13.0
func Clamp[T constraints.Ordered](value T, min T, max T) T
Clamp clamps number within the inclusive lower and upper bounds.
func Coalesce ΒΆ added in v1.14.0
func Coalesce[T comparable](v ...T) (result T, ok bool)
Coalesce returns the first non-default 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 ΒΆ added in v1.7.0
ContainsBy returns true if predicate function return true.
func Count ΒΆ added in v1.12.0
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.9.0
DropRightWhile drops elements from the end of a slice or array while the predicate returns true.
func DropWhile ΒΆ added in v1.9.0
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.
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.7.0
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 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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.10.1
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.7.0
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.12.0
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 ΒΆ added in v1.12.0
Must is a helper that wraps a call to a function returning a value and an error and panics if the error is non-nil.
func Must0 ΒΆ added in v1.12.0
func Must0(err error)
Must0 has the same behavior than Must, but callback returns no variable.
func Must2 ΒΆ added in v1.12.0
Must2 has the same behavior than Must, but callback returns 2 variable2.
func Must3 ΒΆ added in v1.12.0
Must3 has the same behavior than Must, but callback returns 2 variable2.
func Must4 ΒΆ added in v1.12.0
func Must4[T1 any, T2 any, T3 any, T4 any](val1 T1, val2 T2, val3 T3, val4 T4, err error) (T1, T2, T3, T4)
Must4 has the same behavior than Must, but callback returns 2 variable2.
func Must5 ΒΆ added in v1.12.0
func Must5[T1 any, T2 any, T3 any, T4 any, T5 any](val1 T1, val2 T2, val3 T3, val4 T4, val5 T5, err error) (T1, T2, T3, T4, T5)
Must5 has the same behavior than Must, but callback returns 2 variable2.
func Must6 ΒΆ added in v1.12.0
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 error) (T1, T2, T3, T4, T5, T6)
Must6 has the same behavior than Must, but callback returns 2 variable2.
func NewDebounce ΒΆ added in v1.11.0
NewDebounce creates a debounced instance that delays invoking functions given until after wait milliseconds have elapsed.
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.13.0
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 Range ΒΆ added in v1.10.0
Range creates an array of numbers (positive and/or negative) with given length.
func RangeFrom ΒΆ added in v1.10.0
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 ΒΆ added in v1.10.0
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 ΒΆ added in v1.11.0
Reject is the opposite of Filter, this method returns the elements of collection that predicate does not return truthy for.
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 Sample ΒΆ added in v1.6.0
func Sample[T any](collection []T) T
Sample returns a random item from collection.
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.
func Switch ΒΆ
func Switch[T comparable, R any](predicate T) *switchCase[T, R]
Switch is a pure functional switch/case/default statement.
func Times ΒΆ added in v1.5.0
Times invokes the iteratee n times, returning an array of the results of each invocation. The iteratee is invoked with index as argument.
func ToSlicePtr ΒΆ
func ToSlicePtr[T any](collection []T) []*T
ToSlicePtr returns a slice of pointer copy of value.
func Try0 ΒΆ added in v1.11.0
Try0 has the same behavior than Try, but callback returns no variable.
func Try2 ΒΆ added in v1.11.0
Try2 has the same behavior than Try, but callback returns 2 variables.
func Try3 ΒΆ added in v1.11.0
Try3 has the same behavior than Try, but callback returns 3 variables.
func Try4 ΒΆ added in v1.11.0
Try4 has the same behavior than Try, but callback returns 4 variables.
func Try5 ΒΆ added in v1.11.0
Try5 has the same behavior than Try, but callback returns 5 variables.
func Try6 ΒΆ added in v1.11.0
Try6 has the same behavior than Try, but callback returns 6 variables.
func TryCatch ΒΆ added in v1.11.0
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 ΒΆ added in v1.11.0
TryCatchWithErrorValue has the same behavior than TryWithErrorValue, but calls the catch function in case of error.
func TryWithErrorValue ΒΆ added in v1.11.0
TryWithErrorValue has the same behavior than Try, but also returns value passed to panic.
func Union ΒΆ added in v1.8.0
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 Unzip2 ΒΆ added in v1.4.0
Unzip2 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip3 ΒΆ added in v1.4.0
Unzip3 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip4 ΒΆ added in v1.4.0
Unzip4 accepts an array of grouped elements and creates an array regrouping the elements to their pre-zip configuration.
func Unzip5 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
Tuple2 is a group of 2 elements (pair).
func Zip2 ΒΆ added in v1.4.0
Zip2 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 Tuple3 ΒΆ added in v1.4.0
Tuple3 is a group of 3 elements.
func Zip3 ΒΆ added in v1.4.0
Zip3 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 Tuple4 ΒΆ added in v1.4.0
Tuple4 is a group of 4 elements.
func Zip4 ΒΆ added in v1.4.0
Zip4 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 Tuple5 ΒΆ added in v1.4.0
Tuple5 is a group of 5 elements.
func Zip5 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
Tuple6 is a group of 6 elements.
func T6 ΒΆ added in v1.13.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
Tuple7 is a group of 7 elements.
func T7 ΒΆ added in v1.13.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.4.0
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 ΒΆ added in v1.13.0
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 ΒΆ added in v1.4.0
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.
