Skip to content

Instantly share code, notes, and snippets.

@jdegoes
Created December 18, 2011 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jdegoes/1494166 to your computer and use it in GitHub Desktop.
Save jdegoes/1494166 to your computer and use it in GitHub Desktop.
BindSemigroup
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