Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type B ¶
type B[K, V any] struct { // contains filtered or unexported fields }
B is used to handle the builder use case.
type Pair ¶
type Pair[K, V any] struct { // contains filtered or unexported fields }
Pair is used to handle use cases where a pair of values have to be handled. For example, coordinates x and y.
func NewFromCollection ¶
NewFromCollection is used to create a new Pair from the given collection. The collection should contain exactly 2 elements, first element of which becomes first and second element becomes second. If the collection contains more or less than 2 elements, then it returns NIL Pair.
func (*Pair[K, _]) GetFirst ¶
func (p *Pair[K, _]) GetFirst() K
GetFirst is used to get the first value.
func (*Pair[_, V]) GetSecond ¶
func (p *Pair[_, V]) GetSecond() V
GetSecond is used to get the second value.
Click to show internal directories.
Click to hide internal directories.