monad

package
v0.7.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package monad implements common monomorphic monads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EitherStr

type EitherStr struct {
	Result string
	Err    error
}

EitherStr is a monomorphic Either monad specialized to string. I miss Haskell.

func (*EitherStr) Bind

func (r *EitherStr) Bind(f EitherStrFunc) *EitherStr

Bind lifts EitherStrFuncs into the EitherStr monad.

type EitherStrFunc

type EitherStrFunc func(previous string) (string, error)

EitherStrFunc defines monadic EitherStr functions.

Jump to

Keyboard shortcuts

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