tuple

package
v0.0.0-...-97ebcb8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2023 License: Apache-2.0, BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T0

type T0 = struct{}

T0 holds a tuple of 0 values.

type T2

type T2[A0, A1 any] struct {
	A0 A0
	A1 A1
}

T2 holds a tuple of 2 values.

func MkT2

func MkT2[A0, A1 any](a0 A0, a1 A1) T2[A0, A1]

MkT2 returns a 2-tuple formed from its arguments.

func (T2[A0, A1]) T

func (t T2[A0, A1]) T() (A0, A1)

T returns all the tuple's values.

type T3

type T3[A0, A1, A2 any] struct {
	A0 A0
	A1 A1
	A2 A2
}

T3 holds a tuple of 3 values.

func MkT3

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 (T3[A0, A1, A2]) T

func (t T3[A0, A1, A2]) T() (A0, A1, A2)

T returns all the tuple's values.

type T4

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

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 (T4[A0, A1, A2, A3]) T

func (t T4[A0, A1, A2, A3]) T() (A0, A1, A2, A3)

T returns all the tuple's values.

type T5

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

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 (T5[A0, A1, A2, A3, A4]) T

func (t T5[A0, A1, A2, A3, A4]) T() (A0, A1, A2, A3, A4)

T returns all the tuple's values.

type T6

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

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 (T6[A0, A1, A2, A3, A4, A5]) T

func (t T6[A0, A1, A2, A3, A4, A5]) T() (A0, A1, A2, A3, A4, A5)

T returns all the tuple's values.

Directories

Path Synopsis
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL