Discover Packages
github.com/rogpeppe/generic
tuple
package
Version:
v0.0.0-...-97ebcb8
Opens a new window with list of versions in this module.
Published: Mar 19, 2023
License: Apache-2.0, BSD-3-Clause
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
Documentation
¶
Package tuple a collection of generic struct types
that hold a specific number of values.
See the tuple/tuplefunc package for a way to convert between
multiple-argument functions and their single-argument equivalents.
Code generated by tuple/generate.go. DO NOT EDIT.
type T0
type T2
type T3
type T4
type T5
func MkT5[A0, A1, A2, A3, A4 any](a0 A0, a1 A1, a2 A2, a3 A3, a4 A4) T5[A0, A1, A2, A3, A4]
type T6
func MkT6[A0, A1, A2, A3, A4, A5 any](a0 A0, a1 A1, a2 A2, a3 A3, a4 A4, a5 A5) T6[A0, A1, A2, A3, A4, A5]
func (t T6[A0, A1, A2, A3, A4, A5]) T() (A0, A1, A2, A3, A4, A5)
T0 holds a tuple of 0 values.
type T2[A0, A1 any ] struct {
A0 A0
A1 A1
}
T2 holds a tuple of 2 values.
func MkT2[A0, A1 any ](a0 A0, a1 A1) T2 [A0, A1]
MkT2 returns a 2-tuple formed from its arguments.
func (t T2 [A0, A1]) T() (A0, A1)
T returns all the tuple's values.
type T3[A0, A1, A2 any ] struct {
A0 A0
A1 A1
A2 A2
}
T3 holds a tuple of 3 values.
func MkT3[A0, A1, A2 any ](a0 A0, a1 A1, a2 A2) T3 [A0, A1, A2]
MkT3 returns a 3-tuple formed from its arguments.
func (t T3 [A0, A1, A2]) T() (A0, A1, A2)
T returns all the tuple's values.
type T4[A0, A1, A2, A3 any ] struct {
A0 A0
A1 A1
A2 A2
A3 A3
}
T4 holds a tuple of 4 values.
func MkT4[A0, A1, A2, A3 any ](a0 A0, a1 A1, a2 A2, a3 A3) T4 [A0, A1, A2, A3]
MkT4 returns a 4-tuple formed from its arguments.
func (t T4 [A0, A1, A2, A3]) T() (A0, A1, A2, A3)
T returns all the tuple's values.
type T5[A0, A1, A2, A3, A4 any ] struct {
A0 A0
A1 A1
A2 A2
A3 A3
A4 A4
}
T5 holds a tuple of 5 values.
func MkT5[A0, A1, A2, A3, A4 any ](a0 A0, a1 A1, a2 A2, a3 A3, a4 A4) T5 [A0, A1, A2, A3, A4]
MkT5 returns a 5-tuple formed from its arguments.
func (t T5 [A0, A1, A2, A3, A4]) T() (A0, A1, A2, A3, A4)
T returns all the tuple's values.
type T6[A0, A1, A2, A3, A4, A5 any ] struct {
A0 A0
A1 A1
A2 A2
A3 A3
A4 A4
A5 A5
}
T6 holds a tuple of 6 values.
func MkT6[A0, A1, A2, A3, A4, A5 any ](a0 A0, a1 A1, a2 A2, a3 A3, a4 A4, a5 A5) T6 [A0, A1, A2, A3, A4, A5]
MkT6 returns a 6-tuple formed from its arguments.
func (t T6 [A0, A1, A2, A3, A4, A5]) T() (A0, A1, A2, A3, A4, A5)
T returns all the tuple's values.
Source Files
¶
Directories
¶
Package tuplefunc provides functions that convert between multiple-argument and multiple-return functions and single-argument, single-return functions.
Package tuplefunc provides functions that convert between multiple-argument and multiple-return functions and single-argument, single-return functions.
Click to show internal directories.
Click to hide internal directories.