package
Version:
v0.7.0
Opens a new window with list of versions in this module.
Published: Nov 6, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type T2[TL, TR any] struct {
Left TL
Right TR
}
T2 represents a generic tuple holding 2 values.
func NewT2[TL, TR any](left TL, right TR) T2[TL, TR]
func (t T2[TL, TR]) Array() [2]any
Array returns an array of the tuple values.
func (t T2[TL, TR]) Len() int
Len returns the number of values held by the tuple.
func (t T2[TL, TR]) Slice() []any
Slice returns a slice of the tuple values.
String returns the string representation of the tuple.
func (t T2[TL, TR]) Values() (TL, TR)
Values returns the values held by the tuple.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.