endpoints.PartialInvariantFunctorSyntax
Transforms an F[A]
value into an F[B]
value given a partial function
from A
to B
, and a total function from B
to A
.
Transforms an F[A]
value into an F[B]
value given a partial function
from A
to B
, and a total function from B
to A
.
This is useful to refine the type A
into a possibly smaller type B
.