Skip to content

Instantly share code, notes, and snippets.

@gideondk
Last active December 12, 2015 09:49
Show Gist options
  • Save gideondk/4754152 to your computer and use it in GitHub Desktop.
Save gideondk/4754152 to your computer and use it in GitHub Desktop.
import scalaz._
import Scalaz._
import akka.actor.IO._
object IterateeZMonad {
implicit def iterateeZMonad[A] = new Monad[Iteratee] {
override def map[A, B](fa: Iteratee[A])(f: A ⇒ B): Iteratee[B] = fa map f
def point[A](a: ⇒ A): Iteratee[A] = Done[A](a)
def bind[A, B](fa: Iteratee[A])(f: (A) ⇒ Iteratee[B]): Iteratee[B] = fa flatMap f
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment