Skip to content

Commit

Permalink
Implements Monoid interface/typeclass.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Oct 19, 2021
1 parent ae0dab4 commit 27c4ae0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Typeclass/Monoid.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

declare(strict_types=1);

namespace Marcosh\LamPHPda\Typeclass;

/**
* @psalm-immutable
*
* @template A
*/
interface Monoid extends Semigroup
{
/**
* @psalm-pure
*
* @return Monoid<A>
*/
public static function mempty(): Monoid;
}

0 comments on commit 27c4ae0

Please sign in to comment.