Created
December 18, 2011 19:02
-
-
Save jdegoes/1494166 to your computer and use it in GitHub Desktop.
BindSemigroup
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
implicit def BindSemigroup[M[_], A](implicit bind: Bind[M]): Semigroup[M[A]] = new Semigroup[M[A]] { | |
def append(v1: M[A], v2: => M[A]): M[A] = bind.bind(v1)((a: A) => v2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment