final case class SplitMono[A, B](get: (A) => B, reverseGet: (B) => A) extends Product with Serializable
A split monomorphism, which we can think of as a weaker Iso[A, B] where A is a smaller
. type. So get andThen reverseGet andThen remains an identity but reverseGet andThen get is merely
idempotent (i.e., it normalizes values in B). The following statements hold:
reverseGetis a retraction ofget,getis a section ofreverseGet,Ais a retract ofB,- the pair
(reverseGet, get)is a splitting of the idempotentreverseGet andThen get.
- get
section of
reverseGetsuch thatget andThen reverseGetis an identity- reverseGet
any function B => A
- Source
- SplitMono.scala
- See also
Split Monomorphism at nLab
- Alphabetic
- By Inheritance
- SplitMono
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SplitMono(get: (A) => B, reverseGet: (B) => A)
- get
section of
reverseGetsuch thatget andThen reverseGetis an identity- reverseGet
any function B => A
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
- def andThen[C](f: Iso[B, C]): SplitMono[A, C]
Compose with an Iso.
- def andThen[C](f: SplitEpi[B, C]): Wedge[A, C]
Compose with another SplitEpi.
- def andThen[C](f: SplitMono[B, C]): SplitMono[A, C]
Compose with another SplitMono.
- def asFold: Fold[A, B]
View this SplitEpi as a Fold.
- def asGetter: Getter[A, B]
View this SplitMono as a Getter.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asWedge: Wedge[A, B]
View this SplitMono as a Wedge.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val get: (A) => B
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def imapA[C](f: (A) => C, g: (C) => A): SplitMono[C, B]
SplitMono is an invariant functor over A.
- def imapB[C](f: (C) => B, g: (B) => C): SplitMono[A, C]
SplitMono is an invariant functor over B.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def modify(f: (B) => B): (A) => A
Modify the target of the SplitMono using a function.
- def modifyF[F[_]](f: (B) => F[B])(a: A)(implicit arg0: Functor[F]): F[A]
Modify the target of the SplitMono using Functor.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def normalize(b: B): B
reverseGet and get, yielding a normalized formatted value.
reverseGet and get, yielding a normalized formatted value. Subsequent reverseGet/get cycles are idempotent.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def reverse: SplitEpi[B, A]
Swapping
getandreverseGetyields aSplitEpi. - val reverseGet: (B) => A
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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])