zio.prelude.Equivalence
See theEquivalence companion object
trait Equivalence[A, B] extends PartialEquivalence[A, B, Nothing, Nothing]
An Equivalence[A, B] defines an equivalence between two types A and B. These types represent different ways to store the same information.
For example, a List[Byte] is equivalent to a Vector[Byte]. Similarly, a List[Char] is equivalent to a String.
Equivalences are symmetrical. So if A is equivalent to B, then B is equivalent to A.
Value parameters
- from
-
A function that converts a
Binto anA. - to
-
A function that converts an
Ainto aB.
Attributes
- Companion
- object
- Source
- Equivalence.scala
- Graph
-
- Supertypes
- Self type
-
Members list
Value members
Concrete methods
Composes this equivalence with the specified equivalence.
A named method for >>>.
Attributes
- Source
- Equivalence.scala
Flips this equivalence around.
Attributes
- Source
- Equivalence.scala
Attributes
- Source
- Equivalence.scala
Inherited methods
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
Attributes
- Inherited from:
- PartialEquivalence
- Source
- PartialEquivalence.scala
In this article