# Module do_maybe

## Data Types

### applicative()

applicative(A) = [A] | fn(term(), A) | either(term(), A) | maybe(A)

### either()

either(A, B) = {error, A} | {ok, B}

### fn()

fn(A, B, C) = fun((A, B) -> C)

### fn()

fn(A) = fun(() -> A)

### fn()

fn(A, B) = fun((A) -> B)

### maybe()

maybe(A) = {just, A} | nothing

monad(A) = [A] | either(term(), A) | maybe(A)

## Function Index

 append/2 bind/2 cat_maybes/1 do/2 fmap/2 foldr/3 from_just/1 from_maybe/2 is_just/1 is_nothing/1 lift/1 liftA2/2 liftm/2 list_to_maybe/1 map_maybes/2 maybe/3 maybe_to_list/1 mempty/0 pure/1 sequence/1 then/2 traverse/2

## Function Details

### append/2

append(X1::maybe(A), X2::maybe(A)) -> maybe(A)

### bind/2

bind(Maybe::maybe(A), F::fn(A, maybe(B))) -> maybe(B)

### cat_maybes/1

cat_maybes(Maybes::[maybe(A)]) -> [A]

### do/2

do(Maybe::maybe(A), Fs::[fn(A, maybe(B)) | fn(maybe(B))]) -> maybe(B)

### fmap/2

fmap(F::fn(A, B), Maybe::maybe(A)) -> maybe(B)

### foldr/3

foldr(F::fn(A, B, B), B, X3::maybe(A)) -> B

### from_just/1

from_just(Maybe::maybe(A)) -> A

### from_maybe/2

from_maybe(A, Maybe::maybe(A)) -> A

### is_just/1

is_just(Maybe::maybe(term())) -> boolean()

### is_nothing/1

is_nothing(A::maybe(term())) -> boolean()

### liftA2/2

liftA2(Maybe::maybe(fn(A, B)), Maybe::maybe(A)) -> maybe(B)

### liftm/2

liftm(F::function(), Maybes::[maybe(A)]) -> maybe(A)

### list_to_maybe/1

list_to_maybe(X1::[A]) -> maybe(A)

### map_maybes/2

map_maybes(F::fn(A, maybe(B)), List::[A]) -> [B]

### maybe/3

maybe(B, F::fn(A, B), Maybe::maybe(A)) -> B

### maybe_to_list/1

maybe_to_list(Maybe::maybe(A)) -> [A]

### mempty/0

mempty() -> maybe(term())

### pure/1

pure(A) -> maybe(A)

### sequence/1

sequence(Maybe::maybe(applicative(A))) -> applicative(maybe(A))

### then/2

then(Maybe::maybe(term()), F::fn(maybe(A))) -> maybe(A)

### traverse/2

traverse(F::fn(A, applicative(B)), Maybe::maybe(A)) -> applicative(maybe(B))

Generated by EDoc