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
// | |
// Validation[E, A] represents either: | |
// - Success[A] | |
// - Failure[E] | |
// | |
// Isomporphic to scala.Either[E, A] and scalaz.\/[E, A] | |
// | |
// Unlike \/[E, A], Validation is not a Monad, but an Applicative | |
// Functor. So if you want to use it as a Monad you can convert back | |
// and forth using the `validation` and `disjunction` method |
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
// | |
// Disjunction - aka Scalaz Either | |
// \/[A, B] is an alternative to Either[A, B] | |
// -\/ is Left (usually represents failure by convention) | |
// \/- is Right (usually represents success by convention) | |
// Left or Right - which side of the Disjunction does the "-" appear? | |
// | |
// Prefer infix notation to express Disjunction Type v: String \/ Double | |
// | |
// References |