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
- Graph
-
- Supertypes
- Self type
-
Members list
In this article