tuple

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 5 Imported by: 29

README

go-tuple: Generic tuples for Go 1.18+.

Go Coverage Status Go Report Card Go Reference Mentioned in Awesome Go

Go 1.18+ tuple implementation.

Use tuples to store 1 or more values without needing to write a custom struct.

tup := tuple.New2(5, "hi!")
fmt.Println(tup.V1) // Outputs 5.
fmt.Println(tup.V2) // Outputs "hi!".

Tuples come in various sizes, from 1 to 9 elements.

longerTuple := tuple.New5("this", "is", "one", "long", "tuple")

Tuples can be used as slice or array items, map keys or values, and as channel payloads:

// Map holding tuples.
tupInMap := make(map[tuple.T2[string, string]]Person)
tupInMap[tuple.New2("John", "Doe")] = Person{
	FirstName: "John",
	LastName: "Doe",
	// ...
}

// Channel holding tuples.
tupInChan := make(chan tuple.T2[string, error])
go func() {
	defer close(tupInChan)
	tupInChan <- tuple.New2(os.Getwd())
}()
fmt.Print(<-tupInChan)

Features

Create tuples from function calls

func vals() (int, string) {
    return 5, "hi!"
}

func main() {
    tup := tuple.New2(vals())
    fmt.Println(tup.V1)
    fmt.Println(tup.V2)
}

Forward tuples as function arguments

func main() {
    tup := tuple.New2(5, "hi!")
    printValues(tup.Values())
}

func printValues(a int, b string) {
    fmt.Println(a)
    fmt.Println(b)
}

Access tuple values

tup := tuple.New2(5, "hi!")
a, b := tup.Values()

JSON Marshalling

Tuples are marshalled and unmarshalled as JSON arrays.

type User struct {
	Name string `json:"name"`
	Age  int    `json:"age,omitempty"`
}

type MyJSON struct {
	Users []tuple.T2[string, User] `json:"users"`
}

func main() {
	data := MyJSON{
		Users: []tuple.T2[string, User]{
			tuple.New2("foo", User{Name: "foo", Age: 42}),
			tuple.New2("bar", User{Name: "bar", Age: 21}),
			tuple.New2("baz", User{Name: "baz"}),
		},
	}

	marshalled, _ := json.Marshal(data)
	fmt.Printf("%s\n", string(marshalled))
	// Outputs: {"users":[["foo",{"name":"foo","age":42}],["bar",{"name":"bar","age":21}],["baz",{"name":"baz"}]]}
}

Comparison

Tuples are compared from the first element to the last. For example, the tuple [1 2 3] is greater than [1 2 4] but less than [2 2 2].

fmt.Println(tuple.Equal3(tuple.New3(1, 2, 3), tuple.New3(3, 3, 3))) // false.
fmt.Println(tuple.LessThan3(tuple.New3(1, 2, 3), tuple.New3(3, 2, 1))) // true.

tups := []tuple.T3{
    tuple.New3("foo", 2, -23),
    tuple.New3("foo", 72, 15),
    tuple.New3("bar", -4, 43),
}
sort.Slice(tups, func (i, j int) {
    return tuple.LessThan3(tups[i], tups[j])
})

fmt.Println(tups) // [["bar", -4, 43], ["foo", 2, -23], ["foo", 72, 15]].

NOTE

In order to compare tuples, all tuple elements must match constraints.Ordered.

See Custom comparison in order to see how to compare tuples with arbitrary element values.


Comparison result
// Compare* functions return an OrderedComparisonResult value.
result := tuple.Compare3(tuple.New3(1, 2, 3), tuple.New3(3, 2, 1))

// OrderedComparisonResult values are wrapped integers.
fmt.Println(result) // -1

// OrderedComparisonResult expose various method to see the result
// in a more readable way.
fmt.Println(result.GreaterThan()) // false
Custom comparison

The package provides the CompareC comparison functions varation in order to compare tuples of complex comparable types.

For a type to be comparable, it must match the Comparable or Equalable constraints.

type Comparable[T any] interface {
	CompareTo(guest T) OrderedComparisonResult
}

type Equalable[T any] interface {
	Equal(guest T) bool
}
type person struct {
	name string
	age  int
}

func (p person) CompareTo(guest person) tuple.OrderedComparisonResult {
	if p.name < guest.name {
		return -1
	}
	if p.name > guest.name {
		return 1
	}
	return 0
}

func main() {
	tup1 := tuple.New2(person{name: "foo", age: 20}, person{name: "bar", age: 24})
	tup2 := tuple.New2(person{name: "bar", age: 20}, person{name: "baz", age: 24})

	fmt.Println(tuple.LessThan2C(tup1, tup2)) // true.
}

In order to call the complex types variation of the comparable functions, all tuple types must match the Comparable constraint.

While this is not ideal, this a known inconvenience given the current type parameters capabilities in Go. Some solutions have been porposed for this issue (lesser, for example, beatifully articulates the issue), but they still demand features that are not yet implemented by the language.

Once the language will introduce more convenient ways for generic comparisons, this package will adopt it.

Formatting

Tuples implement the Stringer and GoStringer interfaces.

fmt.Printf("%s\n", tuple.New2("hello", "world"))
// Output:
// ["hello" "world"]

fmt.Printf("%#v\n", tuple.New2("hello", "world"))
// Output:
// tuple.T2[string, string]{V1: "hello", V2: "world"}

Notes

The tuple code and test code are generated by the scripts/gen/main.go script.

Generation works by reading tuple.tpl and tuple_test.tpl using Go's text/template engine. tuple.tpl and tuple_test.tpl contain the templated content of a generic tuple class, with variable number of elements.

Contributing

Please feel free to contribute to this project by opening issues or creating pull-requests. However, keep in mind that generic type features for Go are still in their early stages, so there might not be support from the language to your requested feature.

Also keep in mind when contributing to keep the compilation time and performance of this package fast.

Feel free to contact me at barw.code@gmail.com for questions or suggestions!

Documentation

Overview

package tuple defines tuple types that can hold multiple values of varying types. Currently, tuples with up to 9 values are supported.

Tuple methods:

* Len returns the number of values held by the tuple. * Values returns the values held by the tuple. * Array returns an array of the tuple values. * Slice returns a slice of the tuple values. * String returns the string representation of the tuple. * GoString returns a Go-syntax representation of the tuple.

Tuple creation functions:

  • New<N> creates a new tuple holding N generic values.
  • FromArray<N> returns a tuple from an array of length N. If any of the values can not be converted to the generic type, an error is returned.
  • FromArray<N>X returns a tuple from an array of length N. If any of the values can not be converted to the generic type, the function panics.
  • FromSlice<N> returns a tuple from a slice of length N. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.
  • FromSlice<N>X returns a tuple from a slice of length N. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

Tuple comparison functions:

* Equal<N> returns whether the host tuple is equal to the other tuple. * Compare<N> returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. * LessThan<N> returns whether the host tuple is semantically less than the guest tuple. * LessOrEqual<N> returns whether the host tuple is semantically less than or equal to the guest tuple. * GreaterThan<N> returns whether the host tuple is semantically greater than the guest tuple. * GreaterOrEqual<N> returns whether the host tuple is semantically greater than or equal to the guest tuple.

Tuple comparison functions may have an "C" or "E" suffix as overload with additional supported type constraints. Comparison functions ending with "C" accept the "Comparable" constraint. Comparison functions ending with "E" accept the "Equalable contraint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal1

func Equal1[Ty1 comparable](host, guest T1[Ty1]) bool

Equal1 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal1E function. To test equality of tuples that hold custom Comparable values, use the Equal1C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal1C

func Equal1C[Ty1 Comparable[Ty1]](host, guest T1[Ty1]) bool

Equal1C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal1 function. To test equality of tuples that hold custom Equalable values, use the Equal1E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal1E

func Equal1E[Ty1 Equalable[Ty1]](host, guest T1[Ty1]) bool

Equal1E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal1 function. To test equality of tuples that hold custom Comparable values, use the Equal1C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal2

func Equal2[Ty1, Ty2 comparable](host, guest T2[Ty1, Ty2]) bool

Equal2 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal2E function. To test equality of tuples that hold custom Comparable values, use the Equal2C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal2C

func Equal2C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2]](host, guest T2[Ty1, Ty2]) bool

Equal2C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal2 function. To test equality of tuples that hold custom Equalable values, use the Equal2E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal2E

func Equal2E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2]](host, guest T2[Ty1, Ty2]) bool

Equal2E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal2 function. To test equality of tuples that hold custom Comparable values, use the Equal2C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal3

func Equal3[Ty1, Ty2, Ty3 comparable](host, guest T3[Ty1, Ty2, Ty3]) bool

Equal3 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal3E function. To test equality of tuples that hold custom Comparable values, use the Equal3C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal3C

func Equal3C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) bool

Equal3C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal3 function. To test equality of tuples that hold custom Equalable values, use the Equal3E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal3E

func Equal3E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) bool

Equal3E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal3 function. To test equality of tuples that hold custom Comparable values, use the Equal3C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal4

func Equal4[Ty1, Ty2, Ty3, Ty4 comparable](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

Equal4 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal4E function. To test equality of tuples that hold custom Comparable values, use the Equal4C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal4C

func Equal4C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

Equal4C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal4 function. To test equality of tuples that hold custom Equalable values, use the Equal4E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal4E

func Equal4E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3], Ty4 Equalable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

Equal4E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal4 function. To test equality of tuples that hold custom Comparable values, use the Equal4C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal5

func Equal5[Ty1, Ty2, Ty3, Ty4, Ty5 comparable](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

Equal5 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal5E function. To test equality of tuples that hold custom Comparable values, use the Equal5C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal5C

func Equal5C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

Equal5C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal5 function. To test equality of tuples that hold custom Equalable values, use the Equal5E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal5E

func Equal5E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3], Ty4 Equalable[Ty4], Ty5 Equalable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

Equal5E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal5 function. To test equality of tuples that hold custom Comparable values, use the Equal5C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal6

func Equal6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 comparable](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

Equal6 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal6E function. To test equality of tuples that hold custom Comparable values, use the Equal6C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal6C

func Equal6C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

Equal6C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal6 function. To test equality of tuples that hold custom Equalable values, use the Equal6E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal6E

func Equal6E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3], Ty4 Equalable[Ty4], Ty5 Equalable[Ty5], Ty6 Equalable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

Equal6E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal6 function. To test equality of tuples that hold custom Comparable values, use the Equal6C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal7

func Equal7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 comparable](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

Equal7 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal7E function. To test equality of tuples that hold custom Comparable values, use the Equal7C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal7C

func Equal7C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

Equal7C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal7 function. To test equality of tuples that hold custom Equalable values, use the Equal7E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal7E

func Equal7E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3], Ty4 Equalable[Ty4], Ty5 Equalable[Ty5], Ty6 Equalable[Ty6], Ty7 Equalable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

Equal7E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal7 function. To test equality of tuples that hold custom Comparable values, use the Equal7C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal8

func Equal8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 comparable](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

Equal8 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal8E function. To test equality of tuples that hold custom Comparable values, use the Equal8C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal8C

func Equal8C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

Equal8C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal8 function. To test equality of tuples that hold custom Equalable values, use the Equal8E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal8E

func Equal8E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3], Ty4 Equalable[Ty4], Ty5 Equalable[Ty5], Ty6 Equalable[Ty6], Ty7 Equalable[Ty7], Ty8 Equalable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

Equal8E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal8 function. To test equality of tuples that hold custom Comparable values, use the Equal8C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal9

func Equal9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 comparable](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

Equal9 returns whether the host tuple is equal to the other tuple. All tuple elements of the host and guest parameters must match the "comparable" built-in constraint. To test equality of tuples that hold custom Equalable values, use the Equal9E function. To test equality of tuples that hold custom Comparable values, use the Equal9C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal9C

func Equal9C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8], Ty9 Comparable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

Equal9C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal9 function. To test equality of tuples that hold custom Equalable values, use the Equal9E function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func Equal9E

func Equal9E[Ty1 Equalable[Ty1], Ty2 Equalable[Ty2], Ty3 Equalable[Ty3], Ty4 Equalable[Ty4], Ty5 Equalable[Ty5], Ty6 Equalable[Ty6], Ty7 Equalable[Ty7], Ty8 Equalable[Ty8], Ty9 Equalable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

Equal9E returns whether the host tuple is semantically equal to the guest tuple. All tuple elements of the host and guest parameters must match the Equalable constraint. To test equality of tuples that hold built-in "comparable" values, use the Equal9 function. To test equality of tuples that hold custom Comparable values, use the Equal9C function. Otherwise, use Equal or reflect.DeepEqual to test tuples of any types.

func GreaterOrEqual1

func GreaterOrEqual1[Ty1 constraints.Ordered](host, guest T1[Ty1]) bool

GreaterOrEqual1 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual1C function.

func GreaterOrEqual1C

func GreaterOrEqual1C[Ty1 Comparable[Ty1]](host, guest T1[Ty1]) bool

GreaterOrEqual1C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual1 function.

func GreaterOrEqual2

func GreaterOrEqual2[Ty1, Ty2 constraints.Ordered](host, guest T2[Ty1, Ty2]) bool

GreaterOrEqual2 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual2C function.

func GreaterOrEqual2C

func GreaterOrEqual2C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2]](host, guest T2[Ty1, Ty2]) bool

GreaterOrEqual2C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual2 function.

func GreaterOrEqual3

func GreaterOrEqual3[Ty1, Ty2, Ty3 constraints.Ordered](host, guest T3[Ty1, Ty2, Ty3]) bool

GreaterOrEqual3 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual3C function.

func GreaterOrEqual3C

func GreaterOrEqual3C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) bool

GreaterOrEqual3C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual3 function.

func GreaterOrEqual4

func GreaterOrEqual4[Ty1, Ty2, Ty3, Ty4 constraints.Ordered](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

GreaterOrEqual4 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual4C function.

func GreaterOrEqual4C

func GreaterOrEqual4C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

GreaterOrEqual4C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual4 function.

func GreaterOrEqual5

func GreaterOrEqual5[Ty1, Ty2, Ty3, Ty4, Ty5 constraints.Ordered](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

GreaterOrEqual5 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual5C function.

func GreaterOrEqual5C

func GreaterOrEqual5C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

GreaterOrEqual5C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual5 function.

func GreaterOrEqual6

func GreaterOrEqual6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 constraints.Ordered](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

GreaterOrEqual6 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual6C function.

func GreaterOrEqual6C

func GreaterOrEqual6C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

GreaterOrEqual6C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual6 function.

func GreaterOrEqual7

func GreaterOrEqual7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 constraints.Ordered](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

GreaterOrEqual7 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual7C function.

func GreaterOrEqual7C

func GreaterOrEqual7C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

GreaterOrEqual7C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual7 function.

func GreaterOrEqual8

func GreaterOrEqual8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 constraints.Ordered](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

GreaterOrEqual8 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual8C function.

func GreaterOrEqual8C

func GreaterOrEqual8C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

GreaterOrEqual8C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual8 function.

func GreaterOrEqual9

func GreaterOrEqual9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 constraints.Ordered](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

GreaterOrEqual9 returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterOrEqual9C function.

func GreaterOrEqual9C

func GreaterOrEqual9C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8], Ty9 Comparable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

GreaterOrEqual9C returns whether the host tuple is semantically greater than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterOrEqual9 function.

func GreaterThan1

func GreaterThan1[Ty1 constraints.Ordered](host, guest T1[Ty1]) bool

GreaterThan1 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan1C function.

func GreaterThan1C

func GreaterThan1C[Ty1 Comparable[Ty1]](host, guest T1[Ty1]) bool

GreaterThan1C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan1 function.

func GreaterThan2

func GreaterThan2[Ty1, Ty2 constraints.Ordered](host, guest T2[Ty1, Ty2]) bool

GreaterThan2 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan2C function.

func GreaterThan2C

func GreaterThan2C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2]](host, guest T2[Ty1, Ty2]) bool

GreaterThan2C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan2 function.

func GreaterThan3

func GreaterThan3[Ty1, Ty2, Ty3 constraints.Ordered](host, guest T3[Ty1, Ty2, Ty3]) bool

GreaterThan3 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan3C function.

func GreaterThan3C

func GreaterThan3C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) bool

GreaterThan3C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan3 function.

func GreaterThan4

func GreaterThan4[Ty1, Ty2, Ty3, Ty4 constraints.Ordered](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

GreaterThan4 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan4C function.

func GreaterThan4C

func GreaterThan4C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

GreaterThan4C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan4 function.

func GreaterThan5

func GreaterThan5[Ty1, Ty2, Ty3, Ty4, Ty5 constraints.Ordered](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

GreaterThan5 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan5C function.

func GreaterThan5C

func GreaterThan5C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

GreaterThan5C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan5 function.

func GreaterThan6

func GreaterThan6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 constraints.Ordered](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

GreaterThan6 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan6C function.

func GreaterThan6C

func GreaterThan6C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

GreaterThan6C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan6 function.

func GreaterThan7

func GreaterThan7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 constraints.Ordered](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

GreaterThan7 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan7C function.

func GreaterThan7C

func GreaterThan7C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

GreaterThan7C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan7 function.

func GreaterThan8

func GreaterThan8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 constraints.Ordered](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

GreaterThan8 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan8C function.

func GreaterThan8C

func GreaterThan8C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

GreaterThan8C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan8 function.

func GreaterThan9

func GreaterThan9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 constraints.Ordered](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

GreaterThan9 returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the GreaterThan9C function.

func GreaterThan9C

func GreaterThan9C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8], Ty9 Comparable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

GreaterThan9C returns whether the host tuple is semantically greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the GreaterThan9 function.

func LessOrEqual1

func LessOrEqual1[Ty1 constraints.Ordered](host, guest T1[Ty1]) bool

LessOrEqual1 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual1C function.

func LessOrEqual1C

func LessOrEqual1C[Ty1 Comparable[Ty1]](host, guest T1[Ty1]) bool

LessOrEqual1C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual1 function.

func LessOrEqual2

func LessOrEqual2[Ty1, Ty2 constraints.Ordered](host, guest T2[Ty1, Ty2]) bool

LessOrEqual2 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual2C function.

func LessOrEqual2C

func LessOrEqual2C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2]](host, guest T2[Ty1, Ty2]) bool

LessOrEqual2C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual2 function.

func LessOrEqual3

func LessOrEqual3[Ty1, Ty2, Ty3 constraints.Ordered](host, guest T3[Ty1, Ty2, Ty3]) bool

LessOrEqual3 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual3C function.

func LessOrEqual3C

func LessOrEqual3C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) bool

LessOrEqual3C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual3 function.

func LessOrEqual4

func LessOrEqual4[Ty1, Ty2, Ty3, Ty4 constraints.Ordered](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

LessOrEqual4 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual4C function.

func LessOrEqual4C

func LessOrEqual4C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

LessOrEqual4C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual4 function.

func LessOrEqual5

func LessOrEqual5[Ty1, Ty2, Ty3, Ty4, Ty5 constraints.Ordered](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

LessOrEqual5 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual5C function.

func LessOrEqual5C

func LessOrEqual5C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

LessOrEqual5C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual5 function.

func LessOrEqual6

func LessOrEqual6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 constraints.Ordered](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

LessOrEqual6 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual6C function.

func LessOrEqual6C

func LessOrEqual6C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

LessOrEqual6C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual6 function.

func LessOrEqual7

func LessOrEqual7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 constraints.Ordered](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

LessOrEqual7 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual7C function.

func LessOrEqual7C

func LessOrEqual7C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

LessOrEqual7C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual7 function.

func LessOrEqual8

func LessOrEqual8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 constraints.Ordered](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

LessOrEqual8 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual8C function.

func LessOrEqual8C

func LessOrEqual8C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

LessOrEqual8C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual8 function.

func LessOrEqual9

func LessOrEqual9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 constraints.Ordered](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

LessOrEqual9 returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessOrEqual9C function.

func LessOrEqual9C

func LessOrEqual9C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8], Ty9 Comparable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

LessOrEqual9C returns whether the host tuple is semantically less than or equal to the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessOrEqual9 function.

func LessThan1

func LessThan1[Ty1 constraints.Ordered](host, guest T1[Ty1]) bool

LessThan1 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan1C function.

func LessThan1C

func LessThan1C[Ty1 Comparable[Ty1]](host, guest T1[Ty1]) bool

LessThan1C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan1 function.

func LessThan2

func LessThan2[Ty1, Ty2 constraints.Ordered](host, guest T2[Ty1, Ty2]) bool

LessThan2 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan2C function.

func LessThan2C

func LessThan2C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2]](host, guest T2[Ty1, Ty2]) bool

LessThan2C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan2 function.

func LessThan3

func LessThan3[Ty1, Ty2, Ty3 constraints.Ordered](host, guest T3[Ty1, Ty2, Ty3]) bool

LessThan3 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan3C function.

func LessThan3C

func LessThan3C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) bool

LessThan3C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan3 function.

func LessThan4

func LessThan4[Ty1, Ty2, Ty3, Ty4 constraints.Ordered](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

LessThan4 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan4C function.

func LessThan4C

func LessThan4C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) bool

LessThan4C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan4 function.

func LessThan5

func LessThan5[Ty1, Ty2, Ty3, Ty4, Ty5 constraints.Ordered](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

LessThan5 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan5C function.

func LessThan5C

func LessThan5C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) bool

LessThan5C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan5 function.

func LessThan6

func LessThan6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 constraints.Ordered](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

LessThan6 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan6C function.

func LessThan6C

func LessThan6C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) bool

LessThan6C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan6 function.

func LessThan7

func LessThan7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 constraints.Ordered](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

LessThan7 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan7C function.

func LessThan7C

func LessThan7C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) bool

LessThan7C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan7 function.

func LessThan8

func LessThan8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 constraints.Ordered](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

LessThan8 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan8C function.

func LessThan8C

func LessThan8C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) bool

LessThan8C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan8 function.

func LessThan9

func LessThan9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 constraints.Ordered](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

LessThan9 returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the LessThan9C function.

func LessThan9C

func LessThan9C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8], Ty9 Comparable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) bool

LessThan9C returns whether the host tuple is semantically less than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the LessThan9 function.

Types

type Comparable

type Comparable[T any] interface {
	CompareTo(guest T) OrderedComparisonResult
}

Comparable is a constraint interface for complex tuple elements that can be compared to other instances. In order to compare tuples, either all of their elements must be Ordered, or Comparable.

type Equalable

type Equalable[T any] interface {
	Equal(guest T) bool
}

Equalable is a constraint interface for complex tuple elements whose equality to other instances can be tested.

type OrderedComparisonResult

type OrderedComparisonResult int

OrderedComparisonResult represents the result of a tuple ordered comparison. OrderedComparisonResult == 0 represents that the tuples are equal. OrderedComparisonResult < 0 represent that the host tuple is less than the guest tuple. OrderedComparisonResult > 0 represent that the host tuple is greater than the guest tuple.

func Compare1

func Compare1[Ty1 constraints.Ordered](host, guest T1[Ty1]) OrderedComparisonResult

Compare1 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare1C function.

func Compare1C

func Compare1C[Ty1 Comparable[Ty1]](host, guest T1[Ty1]) OrderedComparisonResult

Compare1C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare1 function.

func Compare2

func Compare2[Ty1, Ty2 constraints.Ordered](host, guest T2[Ty1, Ty2]) OrderedComparisonResult

Compare2 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare2C function.

func Compare2C

func Compare2C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2]](host, guest T2[Ty1, Ty2]) OrderedComparisonResult

Compare2C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare2 function.

func Compare3

func Compare3[Ty1, Ty2, Ty3 constraints.Ordered](host, guest T3[Ty1, Ty2, Ty3]) OrderedComparisonResult

Compare3 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare3C function.

func Compare3C

func Compare3C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3]](host, guest T3[Ty1, Ty2, Ty3]) OrderedComparisonResult

Compare3C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare3 function.

func Compare4

func Compare4[Ty1, Ty2, Ty3, Ty4 constraints.Ordered](host, guest T4[Ty1, Ty2, Ty3, Ty4]) OrderedComparisonResult

Compare4 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare4C function.

func Compare4C

func Compare4C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4]](host, guest T4[Ty1, Ty2, Ty3, Ty4]) OrderedComparisonResult

Compare4C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare4 function.

func Compare5

func Compare5[Ty1, Ty2, Ty3, Ty4, Ty5 constraints.Ordered](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) OrderedComparisonResult

Compare5 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare5C function.

func Compare5C

func Compare5C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5]](host, guest T5[Ty1, Ty2, Ty3, Ty4, Ty5]) OrderedComparisonResult

Compare5C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare5 function.

func Compare6

func Compare6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 constraints.Ordered](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) OrderedComparisonResult

Compare6 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare6C function.

func Compare6C

func Compare6C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6]](host, guest T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) OrderedComparisonResult

Compare6C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare6 function.

func Compare7

func Compare7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 constraints.Ordered](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) OrderedComparisonResult

Compare7 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare7C function.

func Compare7C

func Compare7C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7]](host, guest T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) OrderedComparisonResult

Compare7C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare7 function.

func Compare8

func Compare8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 constraints.Ordered](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) OrderedComparisonResult

Compare8 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare8C function.

func Compare8C

func Compare8C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8]](host, guest T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) OrderedComparisonResult

Compare8C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare8 function.

func Compare9

func Compare9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 constraints.Ordered](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) OrderedComparisonResult

Compare9 returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the "Ordered" constraint. To compare tuples that hold custom comparable values, use the Compare9C function.

func Compare9C

func Compare9C[Ty1 Comparable[Ty1], Ty2 Comparable[Ty2], Ty3 Comparable[Ty3], Ty4 Comparable[Ty4], Ty5 Comparable[Ty5], Ty6 Comparable[Ty6], Ty7 Comparable[Ty7], Ty8 Comparable[Ty8], Ty9 Comparable[Ty9]](host, guest T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) OrderedComparisonResult

Compare9C returns whether the host tuple is semantically less than, equal to, or greater than the guest tuple. All tuple elements of the host and guest parameters must match the Comparable constraint. To compare tuples that hold built-in "Ordered" values, use the Compare9 function.

func (OrderedComparisonResult) EQ

func (result OrderedComparisonResult) EQ() bool

EQ is short for Equal and returns whether the compared values are equal.

func (OrderedComparisonResult) Equal

func (result OrderedComparisonResult) Equal() bool

Equal returns whether the compared values are equal.

func (OrderedComparisonResult) GE

func (result OrderedComparisonResult) GE() bool

GE is short for GreaterOrEqual and returns whether the host is greater than or equal to the guest.

func (OrderedComparisonResult) GT

func (result OrderedComparisonResult) GT() bool

GT is short for GreaterThan and returns whether the host is greater than the guest.

func (OrderedComparisonResult) GreaterOrEqual

func (result OrderedComparisonResult) GreaterOrEqual() bool

GreaterOrEqual returns whether the host is greater than or equal to the guest.

func (OrderedComparisonResult) GreaterThan

func (result OrderedComparisonResult) GreaterThan() bool

GreaterThan returns whether the host is greater than the guest.

func (OrderedComparisonResult) LE

func (result OrderedComparisonResult) LE() bool

LE is short for LessOrEqual and returns whether the host is less than or equal to the guest.

func (OrderedComparisonResult) LT

func (result OrderedComparisonResult) LT() bool

LT is short for LessThan and returns whether the host is less than the guest.

func (OrderedComparisonResult) LessOrEqual

func (result OrderedComparisonResult) LessOrEqual() bool

LessOrEqual returns whether the host is less than or equal to the guest.

func (OrderedComparisonResult) LessThan

func (result OrderedComparisonResult) LessThan() bool

LessThan returns whether the host is less than the guest.

type Pair

type Pair[Ty1 any, Ty2 any] T2[Ty1, Ty2]

Pair is a generic type that holds two values.

type T1

type T1[Ty1 any] struct {
	V1 Ty1
}

T1 is a tuple type holding 1 generic values.

func FromArray1

func FromArray1[Ty1 any](arr [1]any) (T1[Ty1], error)

FromArray1 returns a tuple from an array of length 1. If any of the values can not be converted to the generic type, an error is returned.

func FromArray1X

func FromArray1X[Ty1 any](arr [1]any) T1[Ty1]

FromArray1X returns a tuple from an array of length 1. If any of the values can not be converted to the generic type, the function panics.

func FromSlice1

func FromSlice1[Ty1 any](values []any) (T1[Ty1], error)

FromSlice1 returns a tuple from a slice of length 1. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice1X

func FromSlice1X[Ty1 any](values []any) T1[Ty1]

FromSlice1X returns a tuple from a slice of length 1. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New1

func New1[Ty1 any](v1 Ty1) T1[Ty1]

New1 creates a new tuple holding 1 generic values.

func (T1[Ty1]) Array

func (t T1[Ty1]) Array() [1]any

Array returns an array of the tuple values.

func (T1[Ty1]) GoString

func (t T1[Ty1]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T1[Ty1]) Len

func (t T1[Ty1]) Len() int

Len returns the number of values held by the tuple.

func (T1[Ty1]) MarshalJSON added in v1.1.0

func (t T1[Ty1]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T1[Ty1]) Slice

func (t T1[Ty1]) Slice() []any

Slice returns a slice of the tuple values.

func (T1[Ty1]) String

func (t T1[Ty1]) String() string

String returns the string representation of the tuple.

func (*T1[Ty1]) UnmarshalJSON added in v1.1.0

func (t *T1[Ty1]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T1[Ty1]) Values

func (t T1[Ty1]) Values() Ty1

Values returns the values held by the tuple.

type T2

type T2[Ty1, Ty2 any] struct {
	V1 Ty1
	V2 Ty2
}

T2 is a tuple type holding 2 generic values.

func FromArray2

func FromArray2[Ty1, Ty2 any](arr [2]any) (T2[Ty1, Ty2], error)

FromArray2 returns a tuple from an array of length 2. If any of the values can not be converted to the generic type, an error is returned.

func FromArray2X

func FromArray2X[Ty1, Ty2 any](arr [2]any) T2[Ty1, Ty2]

FromArray2X returns a tuple from an array of length 2. If any of the values can not be converted to the generic type, the function panics.

func FromSlice2

func FromSlice2[Ty1, Ty2 any](values []any) (T2[Ty1, Ty2], error)

FromSlice2 returns a tuple from a slice of length 2. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice2X

func FromSlice2X[Ty1, Ty2 any](values []any) T2[Ty1, Ty2]

FromSlice2X returns a tuple from a slice of length 2. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New2

func New2[Ty1, Ty2 any](v1 Ty1, v2 Ty2) T2[Ty1, Ty2]

New2 creates a new tuple holding 2 generic values.

func (T2[Ty1, Ty2]) Array

func (t T2[Ty1, Ty2]) Array() [2]any

Array returns an array of the tuple values.

func (T2[Ty1, Ty2]) GoString

func (t T2[Ty1, Ty2]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T2[Ty1, Ty2]) Len

func (t T2[Ty1, Ty2]) Len() int

Len returns the number of values held by the tuple.

func (T2[Ty1, Ty2]) MarshalJSON added in v1.1.0

func (t T2[Ty1, Ty2]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T2[Ty1, Ty2]) Slice

func (t T2[Ty1, Ty2]) Slice() []any

Slice returns a slice of the tuple values.

func (T2[Ty1, Ty2]) String

func (t T2[Ty1, Ty2]) String() string

String returns the string representation of the tuple.

func (*T2[Ty1, Ty2]) UnmarshalJSON added in v1.1.0

func (t *T2[Ty1, Ty2]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T2[Ty1, Ty2]) Values

func (t T2[Ty1, Ty2]) Values() (Ty1, Ty2)

Values returns the values held by the tuple.

type T3

type T3[Ty1, Ty2, Ty3 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
}

T3 is a tuple type holding 3 generic values.

func FromArray3

func FromArray3[Ty1, Ty2, Ty3 any](arr [3]any) (T3[Ty1, Ty2, Ty3], error)

FromArray3 returns a tuple from an array of length 3. If any of the values can not be converted to the generic type, an error is returned.

func FromArray3X

func FromArray3X[Ty1, Ty2, Ty3 any](arr [3]any) T3[Ty1, Ty2, Ty3]

FromArray3X returns a tuple from an array of length 3. If any of the values can not be converted to the generic type, the function panics.

func FromSlice3

func FromSlice3[Ty1, Ty2, Ty3 any](values []any) (T3[Ty1, Ty2, Ty3], error)

FromSlice3 returns a tuple from a slice of length 3. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice3X

func FromSlice3X[Ty1, Ty2, Ty3 any](values []any) T3[Ty1, Ty2, Ty3]

FromSlice3X returns a tuple from a slice of length 3. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New3

func New3[Ty1, Ty2, Ty3 any](v1 Ty1, v2 Ty2, v3 Ty3) T3[Ty1, Ty2, Ty3]

New3 creates a new tuple holding 3 generic values.

func (T3[Ty1, Ty2, Ty3]) Array

func (t T3[Ty1, Ty2, Ty3]) Array() [3]any

Array returns an array of the tuple values.

func (T3[Ty1, Ty2, Ty3]) GoString

func (t T3[Ty1, Ty2, Ty3]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T3[Ty1, Ty2, Ty3]) Len

func (t T3[Ty1, Ty2, Ty3]) Len() int

Len returns the number of values held by the tuple.

func (T3[Ty1, Ty2, Ty3]) MarshalJSON added in v1.1.0

func (t T3[Ty1, Ty2, Ty3]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T3[Ty1, Ty2, Ty3]) Slice

func (t T3[Ty1, Ty2, Ty3]) Slice() []any

Slice returns a slice of the tuple values.

func (T3[Ty1, Ty2, Ty3]) String

func (t T3[Ty1, Ty2, Ty3]) String() string

String returns the string representation of the tuple.

func (*T3[Ty1, Ty2, Ty3]) UnmarshalJSON added in v1.1.0

func (t *T3[Ty1, Ty2, Ty3]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T3[Ty1, Ty2, Ty3]) Values

func (t T3[Ty1, Ty2, Ty3]) Values() (Ty1, Ty2, Ty3)

Values returns the values held by the tuple.

type T4

type T4[Ty1, Ty2, Ty3, Ty4 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
	V4 Ty4
}

T4 is a tuple type holding 4 generic values.

func FromArray4

func FromArray4[Ty1, Ty2, Ty3, Ty4 any](arr [4]any) (T4[Ty1, Ty2, Ty3, Ty4], error)

FromArray4 returns a tuple from an array of length 4. If any of the values can not be converted to the generic type, an error is returned.

func FromArray4X

func FromArray4X[Ty1, Ty2, Ty3, Ty4 any](arr [4]any) T4[Ty1, Ty2, Ty3, Ty4]

FromArray4X returns a tuple from an array of length 4. If any of the values can not be converted to the generic type, the function panics.

func FromSlice4

func FromSlice4[Ty1, Ty2, Ty3, Ty4 any](values []any) (T4[Ty1, Ty2, Ty3, Ty4], error)

FromSlice4 returns a tuple from a slice of length 4. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice4X

func FromSlice4X[Ty1, Ty2, Ty3, Ty4 any](values []any) T4[Ty1, Ty2, Ty3, Ty4]

FromSlice4X returns a tuple from a slice of length 4. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New4

func New4[Ty1, Ty2, Ty3, Ty4 any](v1 Ty1, v2 Ty2, v3 Ty3, v4 Ty4) T4[Ty1, Ty2, Ty3, Ty4]

New4 creates a new tuple holding 4 generic values.

func (T4[Ty1, Ty2, Ty3, Ty4]) Array

func (t T4[Ty1, Ty2, Ty3, Ty4]) Array() [4]any

Array returns an array of the tuple values.

func (T4[Ty1, Ty2, Ty3, Ty4]) GoString

func (t T4[Ty1, Ty2, Ty3, Ty4]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T4[Ty1, Ty2, Ty3, Ty4]) Len

func (t T4[Ty1, Ty2, Ty3, Ty4]) Len() int

Len returns the number of values held by the tuple.

func (T4[Ty1, Ty2, Ty3, Ty4]) MarshalJSON added in v1.1.0

func (t T4[Ty1, Ty2, Ty3, Ty4]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T4[Ty1, Ty2, Ty3, Ty4]) Slice

func (t T4[Ty1, Ty2, Ty3, Ty4]) Slice() []any

Slice returns a slice of the tuple values.

func (T4[Ty1, Ty2, Ty3, Ty4]) String

func (t T4[Ty1, Ty2, Ty3, Ty4]) String() string

String returns the string representation of the tuple.

func (*T4[Ty1, Ty2, Ty3, Ty4]) UnmarshalJSON added in v1.1.0

func (t *T4[Ty1, Ty2, Ty3, Ty4]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T4[Ty1, Ty2, Ty3, Ty4]) Values

func (t T4[Ty1, Ty2, Ty3, Ty4]) Values() (Ty1, Ty2, Ty3, Ty4)

Values returns the values held by the tuple.

type T5

type T5[Ty1, Ty2, Ty3, Ty4, Ty5 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
	V4 Ty4
	V5 Ty5
}

T5 is a tuple type holding 5 generic values.

func FromArray5

func FromArray5[Ty1, Ty2, Ty3, Ty4, Ty5 any](arr [5]any) (T5[Ty1, Ty2, Ty3, Ty4, Ty5], error)

FromArray5 returns a tuple from an array of length 5. If any of the values can not be converted to the generic type, an error is returned.

func FromArray5X

func FromArray5X[Ty1, Ty2, Ty3, Ty4, Ty5 any](arr [5]any) T5[Ty1, Ty2, Ty3, Ty4, Ty5]

FromArray5X returns a tuple from an array of length 5. If any of the values can not be converted to the generic type, the function panics.

func FromSlice5

func FromSlice5[Ty1, Ty2, Ty3, Ty4, Ty5 any](values []any) (T5[Ty1, Ty2, Ty3, Ty4, Ty5], error)

FromSlice5 returns a tuple from a slice of length 5. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice5X

func FromSlice5X[Ty1, Ty2, Ty3, Ty4, Ty5 any](values []any) T5[Ty1, Ty2, Ty3, Ty4, Ty5]

FromSlice5X returns a tuple from a slice of length 5. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New5

func New5[Ty1, Ty2, Ty3, Ty4, Ty5 any](v1 Ty1, v2 Ty2, v3 Ty3, v4 Ty4, v5 Ty5) T5[Ty1, Ty2, Ty3, Ty4, Ty5]

New5 creates a new tuple holding 5 generic values.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Array

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Array() [5]any

Array returns an array of the tuple values.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) GoString

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Len

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Len() int

Len returns the number of values held by the tuple.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) MarshalJSON added in v1.1.0

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Slice

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Slice() []any

Slice returns a slice of the tuple values.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) String

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) String() string

String returns the string representation of the tuple.

func (*T5[Ty1, Ty2, Ty3, Ty4, Ty5]) UnmarshalJSON added in v1.1.0

func (t *T5[Ty1, Ty2, Ty3, Ty4, Ty5]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Values

func (t T5[Ty1, Ty2, Ty3, Ty4, Ty5]) Values() (Ty1, Ty2, Ty3, Ty4, Ty5)

Values returns the values held by the tuple.

type T6

type T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
	V4 Ty4
	V5 Ty5
	V6 Ty6
}

T6 is a tuple type holding 6 generic values.

func FromArray6

func FromArray6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 any](arr [6]any) (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6], error)

FromArray6 returns a tuple from an array of length 6. If any of the values can not be converted to the generic type, an error is returned.

func FromArray6X

func FromArray6X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 any](arr [6]any) T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]

FromArray6X returns a tuple from an array of length 6. If any of the values can not be converted to the generic type, the function panics.

func FromSlice6

func FromSlice6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 any](values []any) (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6], error)

FromSlice6 returns a tuple from a slice of length 6. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice6X

func FromSlice6X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 any](values []any) T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]

FromSlice6X returns a tuple from a slice of length 6. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New6

func New6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6 any](v1 Ty1, v2 Ty2, v3 Ty3, v4 Ty4, v5 Ty5, v6 Ty6) T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]

New6 creates a new tuple holding 6 generic values.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Array

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Array() [6]any

Array returns an array of the tuple values.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) GoString

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Len

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Len() int

Len returns the number of values held by the tuple.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) MarshalJSON added in v1.1.0

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Slice

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Slice() []any

Slice returns a slice of the tuple values.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) String

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) String() string

String returns the string representation of the tuple.

func (*T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) UnmarshalJSON added in v1.1.0

func (t *T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Values

func (t T6[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6]) Values() (Ty1, Ty2, Ty3, Ty4, Ty5, Ty6)

Values returns the values held by the tuple.

type T7

type T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
	V4 Ty4
	V5 Ty5
	V6 Ty6
	V7 Ty7
}

T7 is a tuple type holding 7 generic values.

func FromArray7

func FromArray7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any](arr [7]any) (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7], error)

FromArray7 returns a tuple from an array of length 7. If any of the values can not be converted to the generic type, an error is returned.

func FromArray7X

func FromArray7X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any](arr [7]any) T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]

FromArray7X returns a tuple from an array of length 7. If any of the values can not be converted to the generic type, the function panics.

func FromSlice7

func FromSlice7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any](values []any) (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7], error)

FromSlice7 returns a tuple from a slice of length 7. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice7X

func FromSlice7X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any](values []any) T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]

FromSlice7X returns a tuple from a slice of length 7. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New7

func New7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7 any](v1 Ty1, v2 Ty2, v3 Ty3, v4 Ty4, v5 Ty5, v6 Ty6, v7 Ty7) T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]

New7 creates a new tuple holding 7 generic values.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Array

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Array() [7]any

Array returns an array of the tuple values.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) GoString

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Len

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Len() int

Len returns the number of values held by the tuple.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) MarshalJSON added in v1.1.0

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Slice

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Slice() []any

Slice returns a slice of the tuple values.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) String

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) String() string

String returns the string representation of the tuple.

func (*T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) UnmarshalJSON added in v1.1.0

func (t *T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Values

func (t T7[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7]) Values() (Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7)

Values returns the values held by the tuple.

type T8

type T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
	V4 Ty4
	V5 Ty5
	V6 Ty6
	V7 Ty7
	V8 Ty8
}

T8 is a tuple type holding 8 generic values.

func FromArray8

func FromArray8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 any](arr [8]any) (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8], error)

FromArray8 returns a tuple from an array of length 8. If any of the values can not be converted to the generic type, an error is returned.

func FromArray8X

func FromArray8X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 any](arr [8]any) T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]

FromArray8X returns a tuple from an array of length 8. If any of the values can not be converted to the generic type, the function panics.

func FromSlice8

func FromSlice8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 any](values []any) (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8], error)

FromSlice8 returns a tuple from a slice of length 8. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice8X

func FromSlice8X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 any](values []any) T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]

FromSlice8X returns a tuple from a slice of length 8. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New8

func New8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8 any](v1 Ty1, v2 Ty2, v3 Ty3, v4 Ty4, v5 Ty5, v6 Ty6, v7 Ty7, v8 Ty8) T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]

New8 creates a new tuple holding 8 generic values.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Array

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Array() [8]any

Array returns an array of the tuple values.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) GoString

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Len

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Len() int

Len returns the number of values held by the tuple.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) MarshalJSON added in v1.1.0

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Slice

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Slice() []any

Slice returns a slice of the tuple values.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) String

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) String() string

String returns the string representation of the tuple.

func (*T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) UnmarshalJSON added in v1.1.0

func (t *T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Values

func (t T8[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8]) Values() (Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8)

Values returns the values held by the tuple.

type T9

type T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any] struct {
	V1 Ty1
	V2 Ty2
	V3 Ty3
	V4 Ty4
	V5 Ty5
	V6 Ty6
	V7 Ty7
	V8 Ty8
	V9 Ty9
}

T9 is a tuple type holding 9 generic values.

func FromArray9

func FromArray9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any](arr [9]any) (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9], error)

FromArray9 returns a tuple from an array of length 9. If any of the values can not be converted to the generic type, an error is returned.

func FromArray9X

func FromArray9X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any](arr [9]any) T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]

FromArray9X returns a tuple from an array of length 9. If any of the values can not be converted to the generic type, the function panics.

func FromSlice9

func FromSlice9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any](values []any) (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9], error)

FromSlice9 returns a tuple from a slice of length 9. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, an error is returned.

func FromSlice9X

func FromSlice9X[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any](values []any) T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]

FromSlice9X returns a tuple from a slice of length 9. If the length of the slice doesn't match, or any of the values can not be converted to the generic type, the function panics.

func New9

func New9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9 any](v1 Ty1, v2 Ty2, v3 Ty3, v4 Ty4, v5 Ty5, v6 Ty6, v7 Ty7, v8 Ty8, v9 Ty9) T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]

New9 creates a new tuple holding 9 generic values.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Array

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Array() [9]any

Array returns an array of the tuple values.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) GoString

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) GoString() string

GoString returns a Go-syntax representation of the tuple.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Len

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Len() int

Len returns the number of values held by the tuple.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) MarshalJSON added in v1.1.0

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the tuple into a JSON array.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Slice

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Slice() []any

Slice returns a slice of the tuple values.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) String

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) String() string

String returns the string representation of the tuple.

func (*T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) UnmarshalJSON added in v1.1.0

func (t *T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) UnmarshalJSON(data []byte) error

MarshalJSON unmarshals the tuple from a JSON array.

func (T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Values

func (t T9[Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9]) Values() (Ty1, Ty2, Ty3, Ty4, Ty5, Ty6, Ty7, Ty8, Ty9)

Values returns the values held by the tuple.

Directories

Path Synopsis
scripts
gen

Jump to

Keyboard shortcuts

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