Last active
August 29, 2015 14:04
-
-
Save davidandrzej/274da5ddfb2b96ce6ec8 to your computer and use it in GitHub Desktop.
Excerpted from https://github.com/scalaz/scalaz for instructional purposes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Monoid[F] extends Semigroup[F] { | |
... | |
trait MonoidLaw extends SemigroupLaw { | |
def leftIdentity(a: F)(implicit F: Equal[F]) = | |
F.equal(a, append(zero, a)) | |
def rightIdentity(a: F)(implicit F: Equal[F]) = | |
F.equal(a, append(a, zero)) | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment