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
object KleisliValidation extends App { | |
import scalaz._ | |
import Scalaz._ | |
import scala.util.control.Exception._ | |
type EValidation[+T] = Validation[String, T] | |
implicit val binding = new Bind[EValidation] { | |
def map[A, B](fa: EValidation[A])(f: A => B): EValidation[B] = fa.map(f) | |
def bind[A, B](fa: EValidation[A])(f: A => EValidation[B]): EValidation[B] = fa.flatMap(f) | |
} |