ittuple

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T2

type T2[TL, TR any] struct {
	Left  TL
	Right TR
}

T2 represents a generic tuple holding 2 values.

func NewT2

func NewT2[TL, TR any](left TL, right TR) T2[TL, TR]

func (T2[TL, TR]) Array

func (t T2[TL, TR]) Array() [2]any

Array returns an array of the tuple values.

func (T2[TL, TR]) Len

func (t T2[TL, TR]) Len() int

Len returns the number of values held by the tuple.

func (T2[TL, TR]) Slice

func (t T2[TL, TR]) Slice() []any

Slice returns a slice of the tuple values.

func (T2[TL, TR]) String

func (t T2[TL, TR]) String() string

String returns the string representation of the tuple.

func (T2[TL, TR]) Values

func (t T2[TL, TR]) Values() (TL, TR)

Values returns the values held by the tuple.

Jump to

Keyboard shortcuts

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