Documentation ¶
Index ¶
- func For[A any](res Result[A], f func(a A))
- func ForErr[A any](res Result[A], f func(error))
- func Get[A any](res Result[A]) A
- func GetErr[A any](res Result[A]) error
- func IsErr[A any](res Result[A]) bool
- func IsOK[A any](res Result[A]) bool
- func NewResultApplicative[A any]() *resultApplicative[A]
- func NewResultFunctor[A, B any]() *resultFunctor[A, B]
- func Unpack[A any](res Result[A]) (A, error)
- type Err
- type Ok
- type Result
- func AndThen[A, B any](res Result[A], f func(A) Result[B]) Result[B]
- func FlatMap[A, B any](res Result[A], f func(A) Result[B]) Result[B]
- func From[A any](x A) Result[A]
- func FromErr[A any](err error) Result[A]
- func Map[A, B any](res Result[A], f func(A) B) Result[B]
- func MapErr[A any](res Result[A], f func(error) error) Result[A]
- type ResultKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewResultApplicative ¶
func NewResultApplicative[A any]() *resultApplicative[A]
func NewResultFunctor ¶
func NewResultFunctor[A, B any]() *resultFunctor[A, B]
Types ¶
type ResultKind ¶
Click to show internal directories.
Click to hide internal directories.