trait PartialInvariantFunctor[F[_]] extends InvariantFunctor[F]
Given a type constructor F
, a partial function A => Validated[B]
and a total function B => A
, turns an F[A]
into an F[B]
.
A partial invariant functor is an invariant functor whose covariant
transformation function is total (ie, A => Valid[B]
).
- Alphabetic
- By Inheritance
- PartialInvariantFunctor
- InvariantFunctor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def xmapPartial[A, B](fa: F[A], f: (A) => Validated[B], g: (B) => A): F[B]
Transforms an
F[A]
value into anF[B]
value given a partial function fromA
toB
, and a total function fromB
toA
.Transforms an
F[A]
value into anF[B]
value given a partial function fromA
toB
, and a total function fromB
toA
.This is useful to refine the type
A
into a possibly smaller typeB
.- See also
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def xmap[A, B](fa: F[A], f: (A) => B, g: (B) => A): F[B]
Transforms an
F[A]
value into anF[B]
value given a pair of functions fromA
toB
and fromB
toA
.Transforms an
F[A]
value into anF[B]
value given a pair of functions fromA
toB
and fromB
toA
.- Definition Classes
- PartialInvariantFunctor → InvariantFunctor
- See also
- final def xmapWithCodec[A, B](fa: F[A], codec: Codec[A, B]): F[B]
Transforms an
F[A]
value into anF[B]
value given aCodec[A, B]
.Transforms an
F[A]
value into anF[B]
value given aCodec[A, B]
.This is useful to refine the type
A
into a possibly smaller typeB
.- See also