PHP Class Widmogrod\Monad\IO

Inheritance: implements Widmogrod\FantasyLand\Monad, implements Widmogrod\FantasyLand\Foldable, use trait Widmogrod\Common\PointedTrait
Show file Open project: widmogrod/php-functional Class Usage Examples

Public Methods

Method Description
__construct ( callable $unsafe )
ap ( Widmogrod\FantasyLand\Apply $b )
bind ( callable $function ) bind :: IO a -> (a -> IO b) -> IO b
map ( callable $function )
reduce ( callable $function, $accumulator )
run ( ) : mixed Perform unsafe operation

Method Details

__construct() public method

public __construct ( callable $unsafe )
$unsafe callable

ap() public method

public ap ( Widmogrod\FantasyLand\Apply $b )
$b Widmogrod\FantasyLand\Apply

bind() public method

bind :: IO a -> (a -> IO b) -> IO b
public bind ( callable $function )
$function callable

map() public method

public map ( callable $function )
$function callable

reduce() public method

public reduce ( callable $function, $accumulator )
$function callable

run() public method

Perform unsafe operation
public run ( ) : mixed
return mixed