Documentation ¶
Index ¶
- func Exists[L, R any](predicate func(right R) bool) func(Either[L, R]) bool
- func FromOption[L, R any](onNone func() L) func(o opt.Option[R]) Either[L, R]
- func FromPredicate[L, R any](predicate func(value R) bool, onLeft func() L) func(R) Either[L, R]
- func GetOrElse[L, R any](onLeft func(left L) R) func(Either[L, R]) R
- func IsLeft[L, R any](e Either[L, R]) bool
- func IsRight[L, R any](e Either[L, R]) bool
- func Map[L, R, T any](onRight func(right R) T) func(Either[L, R]) Either[L, T]
- func MapLeft[L, R, T any](fn func(left L) T) func(Either[L, R]) Either[T, R]
- func Match[L, R, T any](onLeft func(left L) T, onRight func(right R) T) func(Either[L, R]) T
- type Either
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromPredicate ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.