IO(fn)

new IO(fn)

Parameters:
Name Type Description
fn function

Operation to contain within IO

Properties:
Name Type Description
`value` *

IO however wraps non-function values to function on construction.

Extends

Methods

ap(x) → {Apply}

Applicative apply operation - applies contained function over passed in functor.

Parameters:
Name Type Description
x Functor
Returns:
Apply
Inherited From:

fmap(fn) → {Functor}

Same as #Functor.map.

Parameters:
Name Type Description
fn function
Returns:
Functor
Inherited From:

map(fn) → {Functor}

Maps a function over contents of functor.

Parameters:
Name Type Description
fn function

Function that takes one any and returns one any.

Returns:
Functor
Inherited From:

valueOf() → {*}

Extracts value of functor (same as monadic join).

Returns:
*
Inherited From: