Constructor
new MonetEitherT(monadnon-null, isRightValue) → {MonetEitherT|Either|FlutureTMonetEither}
- Source:
Constructor for transforming monads. Call also be used as static function without calling new statement.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
monad |
Monad | ||
isRightValue |
boolean |
true
|
Returns:
- Type
- MonetEitherT | Either | FlutureTMonetEither
Methods
(static) left(monadnon-null) → {MonetEitherT}
- Source:
Wraps monad
into left side of the transformer.
Parameters:
Name | Type | Description |
---|---|---|
monad |
Monad |
Returns:
- Type
- MonetEitherT
(static) of(monadnon-null) → {MonetEitherT|FlutureTMonetEither|Either}
- Source:
Returns corresponding transformer for the monad.
Parameters:
Name | Type | Description |
---|---|---|
monad |
Monad |
Returns:
- Type
- MonetEitherT | FlutureTMonetEither | Either
(static) right(monadnon-null) → {MonetEitherT|FlutureTMonetEither|Either}
- Source:
Wraps monad
into right side of the transformer.
Parameters:
Name | Type | Description |
---|---|---|
monad |
Monad |
Returns:
- Type
- MonetEitherT | FlutureTMonetEither | Either
ap(monadWithFn) → {MonetEitherT}
- Source:
This takes an MonetEitherT instance that has a function on the right side and then applies it to the right side of itself.
Parameters:
Name | Type | Description |
---|---|---|
monadWithFn |
MonetEitherT |
Returns:
- Type
- MonetEitherT
chain(fn) → {MonetEitherT}
- Source:
Performs a monadic bind over the inner monad.
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
Returns:
- Type
- MonetEitherT
isLeft() → {boolean}
- Source:
Returns true if this transformer is left, false otherwise.
Returns:
- Type
- boolean
isRight() → {boolean}
- Source:
Returns true if this transformer is right, false otherwise.
Returns:
- Type
- boolean
left() → {Monad}
- Source:
Returns the value in the left side, otherwise throws an exception.
Returns:
- Type
- Monad
map(fn) → {MonetEitherT}
- Source:
Functor interface. Map the right side of this transformer with the provided function.
Parameters:
Name | Type | Description |
---|---|---|
fn |
function |
Returns:
- Type
- MonetEitherT
right() → {Monad}
- Source:
Returns the value in the right side, otherwise throws an exception.
Returns:
- Type
- Monad