maybe_then: Chain together many computations that may fail (return...

Description Usage Arguments Format Value See Also

Description

Binds then calls function. If the first argument, m, is Nothing() any chain of operations will short-circuit and result in Nothing()

Usage

1
maybe_then(m, f)

Arguments

m

A Maybe (two-track) value.

f

A function taking a non-optional (one-track) argument and returning an optional (two-track) value. May or may not be called.

Format

maybe_then :: Maybe a -> (a -> Maybe b) -> Maybe b

Value

Nothing() if the m is Nothing(). Otherwise the result of applying the function

See Also

Other Maybe functions: as_maybe, is_nothing, maybe_apply, maybe_bind, maybe_default, maybe_map_2, maybe_map_3, maybe_map_4, maybe_map_5, maybe_map, maybes_collapse, maybes_partition


Teresa00/hfmAnnotation documentation built on May 14, 2019, 12:51 a.m.