maybe

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNone = errors.New("None")

Functions

func IsNone

func IsNone[T any](m Maybe[T]) bool

func IsOk

func IsOk[T any](m Maybe[T]) bool

func None

func None[T any]() (x T, err error)

Types

type Maybe

type Maybe[T any] func() (T, error)

func Map

func Map[T, V any, F monad.Functor[T, V]](m Maybe[T], f F) Maybe[V]

func Ok

func Ok[T any](v T) Maybe[T]

Jump to

Keyboard shortcuts

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