package
Version:
v0.9.1
Opens a new window with list of versions in this module.
Published: Jan 23, 2026
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pair provides tuple types and functions for working with pairs of values.
func ZipWith[A, B, R any](as []A, bs []B, fn func(A, B) R) []R
ZipWith applies fn to corresponding elements of the two input slices.
Panics if the slices have different lengths.
type X[V1, V2 any] struct {
V1 V1
V2 V2
}
X is a value of the Cartesian cross-product of the given types.
Cross-product is represented by an x.
func Of[V, V2 any](v V, v2 V2) X[V, V2]
func Zip[V1, V2 any](v1s []V1, v2s []V2) []X[V1, V2]
Zip returns a slice of each pair of elements from the two input slices.
Panics if the slices have different lengths.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.