GIVEN a set of Monads
WHEN a developer wants to manage and Id
THEN Identity Monad
Breakdown:
- Identity is the type for an Identity monad.
- of(value) wraps a value in the Identity monad.
- map(fn) applies a function fn to the value inside the monad.
- chain(fn) applies a function that returns another monad.
- identity(value) unwraps the value from the Identity monad.
source
GIVEN a set of Monads
WHEN a developer wants to manage and
IdTHEN
IdentityMonadBreakdown:
source