PartialInvariantFunctorSyntax

implicit class PartialInvariantFunctorSyntax[A, F[_]](val fa: F[A])(implicit ev: PartialInvariantFunctor[F])
class Object
trait Matchable
class Any

Value members

Concrete methods

def xmapPartial[B](f: A => Validated[B])(g: B => A): F[B]

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.

See also:
def xmapWithCodec[B](codec: Codec[A, B]): F[B]

Transforms an F[A] value into an F[B] value given a Codec[A, B].

Transforms an F[A] value into an F[B] value given a Codec[A, B].

This is useful to ''refine'' the type A into a possibly smaller type B.

See also:

Concrete fields

val fa: F[A]