EitherSyntax

class EitherSyntax[V](either: Either[String, V])

Syntax for treating scalaz.\/ as signifiers of success or failure in a computation.

Syntax for treating scalaz.\/ as signifiers of success or failure in a computation.

The simplest usage is something like: myEither ~>? "Do I have the right?". The 'value' and log tree of the returned treelog.LogTreeSyntax.DescribedComputation will indicate success or failure depending on the value of myEither.

class Object
trait Matchable
class Any

Value members

Concrete methods

def ~>?(leftDescription: String => String, rightDescription: => String): DescribedComputation[V]

Use different descriptions depending on whether either is a \/- or a -\/.

Use different descriptions depending on whether either is a \/- or a -\/.

def ~>?(description: String): DescribedComputation[V]

Use the same description regardless of whether either is a \/- or a -\/. Equivalent to: ~>?((error: String) => s"$description - $error", description)

Use the same description regardless of whether either is a \/- or a -\/. Equivalent to: ~>?((error: String) => s"$description - $error", description)

def ~>?(description: V => String): DescribedComputation[V]

Use the given description if either is a \/-. If either is -\/(message), use message as the description.

Use the given description if either is a \/-. If either is -\/(message), use message as the description.

def ~>?(leftDescription: String => String, rightDescription: V => String): DescribedComputation[V]

Use the given functions to provide descriptions depending on whether either is a \/- or -\/

Use the given functions to provide descriptions depending on whether either is a \/- or -\/