new Monad(x)
Parameters:
| Name | Type | Description |
|---|---|---|
x |
* |
Properties:
| Name | Type | Description |
|---|---|---|
value |
* |
Extends
Methods
-
static chain(fn) → {Monad}
-
Same as
Monad.flatMap.Parameters:
Name Type Description fnfunction Returns:
Monad -
static flatMap(fn) → {Monad}
-
Flat map operation.
Parameters:
Name Type Description fnfunction Returns:
Monad -
static join() → {*}
-
Monadic join - Removes one layer of monadic structure from value.
Returns:
* -
static of(x) → {Monad}
-
Same as
new Monad(...)just in 'static' function format.Parameters:
Name Type Description x* Returns:
Monad -
ap(x) → {Apply}
-
Applicative apply operation - applies contained function over passed in functor.
Parameters:
Name Type Description xFunctor Returns:
Apply- Inherited From:
-
fmap(fn) → {Functor}
-
Same as
#Functor.map.Parameters:
Name Type Description fnfunction Returns:
Functor- Inherited From:
-
map(fn) → {Functor}
-
Maps a function over contents of functor.
Parameters:
Name Type Description fnfunction Function that takes one
anyand returns oneany.Returns:
Functor- Inherited From:
-
valueOf() → {*}
-
Extracts value of functor (same as monadic
join).Returns:
*- Inherited From: