Equivalence

zio.prelude.Equivalence
See theEquivalence companion trait
object Equivalence

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[A, B](to0: A => B, from0: B => A): Equivalence[A, B]
def either[A, B, C]: Equivalence[Either[A, Either[B, C]], Either[Either[A, B], C]]

Constructs an equivalence between a right-associated nested either, and a left-associated nested either.

Constructs an equivalence between a right-associated nested either, and a left-associated nested either.

Attributes

def eitherNothing[A]: Equivalence[Either[A, Nothing], A]
def fromPartial[A, B, E1, E2](toPartial0: A => Either[E1, B], fromPartial0: B => Either[E2, A])(ev1: E1 <:< Nothing, ev2: E2 <:< Nothing): Equivalence[A, B]

Constructs the identity equivalence, which just says that any type is equivalent to itself and is trivially true.

Constructs the identity equivalence, which just says that any type is equivalent to itself and is trivially true.

Attributes

def tuple[A, B, C]: Equivalence[(A, (B, C)), ((A, B), C)]

Constructs an equivalence between a right-associated nested tuple, and a left-associated nested tuple.

Constructs an equivalence between a right-associated nested tuple, and a left-associated nested tuple.

Attributes

def tupleAny[A]: Equivalence[(A, Any), A]
def tupleFlip[A, B]: Equivalence[(A, B), (B, A)]
def unapply[A, B](self: Equivalence[A, B]): Some[(A => B, B => A)]