PHP Class Widmogrod\Monad\State

Inheritance: implements Widmogrod\FantasyLand\Monad, use trait Widmogrod\Common\PointedTrait
Afficher le fichier Open project: widmogrod/php-functional Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( callable $continuation )
ap ( Widmogrod\FantasyLand\Apply $b )
bind ( callable $function )
map ( callable $function )
runState ( mixed $initialState ) : array runState :: s -> (a, s)

Method Details

__construct() public méthode

public __construct ( callable $continuation )
$continuation callable

ap() public méthode

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

bind() public méthode

public bind ( callable $function )
$function callable

map() public méthode

public map ( callable $function )
$function callable

runState() public méthode

Run computation on a monad with initial state
public runState ( mixed $initialState ) : array
$initialState mixed
Résultat array