Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Either ¶
type Either[L, R any] interface { // IsLeft returns true if the Either instance is a Left. IsLeft() bool // Left returns the left value. Left() L // IsRight returns true if the Either instance is a Right. IsRight() bool // Right returns the right value. Right() R }
Either is an interface that represents a value of one of two possible types.
type Option ¶
type Option[T any] interface { // IsDefined returns true if the Option instance is defined. IsDefined() bool // IsEmpty returns true if the Option instance is empty. IsEmpty() bool // Get returns the value of the Option instance. Get() T // GetOrElse returns the value of the Option instance if it is defined. Otherwise, it returns the given default value. GetOrElse(defaultValue T) T }
Option is a type that represents an optional value.
Click to show internal directories.
Click to hide internal directories.