either

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Either

type Either[L any, R any] struct {
	// contains filtered or unexported fields
}

func NewLeft

func NewLeft[L any, R any](l L) Either[L, R]

func NewRight

func NewRight[L any, R any](r R) Either[L, R]

func (Either[T, E]) IsLeft

func (v Either[T, E]) IsLeft() bool

func (Either[T, E]) IsRight

func (v Either[T, E]) IsRight() bool

func (Either[T, E]) Left

func (v Either[T, E]) Left() T

func (Either[L, R]) MapLeft

func (v Either[L, R]) MapLeft(f func(l L))

func (Either[L, R]) MapRight

func (v Either[L, R]) MapRight(f func(r R))

func (Either[T, E]) Right

func (v Either[T, E]) Right() E

Jump to

Keyboard shortcuts

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