<?php
namespace Widmogrod\Functional;

use Widmogrod\FantasyLand\Monoid;

const mempty = 'Widmogrod\Functional\mempty';

function mempty(Monoid $a)
{
    return $a->getEmpty();
}

const mappend = 'Widmogrod\Functional\mappend';

function mappend(Monoid $a, Monoid $b)
{
    return $a->concat($b);
}

<?php
namespace Widmogrod\Functional;

use Widmogrod\FantasyLand\Monoid;
use Widmogrod\FantasyLand\Semigroup;

const mempty = 'Widmogrod\Functional\mempty';

/**
 * mempty :: a
 *
 * @param Monoid $a
 * @return Monoid
 */
function mempty(Monoid $a)
{
    return $a->getEmpty();
}

const mappend = 'Widmogrod\Functional\mappend';

/**
 * mappend :: a -> a -> a
 *
 * @param Semigroup $a
 * @param Semigroup $b
 * @return Semigroup
 */
function mappend(Semigroup $a, Semigroup $b)
{
    return $a->concat($b);
}

Add adnotations to mappend & mempty
Add adnotations to mappend & mempty
