Inheritance: extends Widmogrod\FantasyLand\Semigroup
Exemple #1
0
/**
 * emptyM :: a
 *
 * @param Monoid $a
 *
 * @return Monoid
 */
function emptyM(Monoid $a)
{
    return $a->getEmpty();
}
Exemple #2
0
 public function bind(callable $function)
 {
     list($value, $side) = call_user_func($function, $this->value)->runWriter();
     return new static($value, $this->side->concat($side));
 }