Packages

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:

  • reverseGet is a retraction of get,
  • get is a section of reverseGet,
  • A is a retract of B,
  • the pair (reverseGet, get) is a splitting of the idempotent reverseGet andThen get.
get

section of reverseGet such that get andThen reverseGet is an identity

reverseGet

any function B => A

Source
SplitMono.scala
See also

Split Monomorphism at nLab

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SplitMono
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SplitMono(get: (A) => B, reverseGet: (B) => A)

    get

    section of reverseGet such that get andThen reverseGet is an identity

    reverseGet

    any function B => A

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[C](f: Iso[B, C]): SplitMono[A, C]

    Compose with an Iso.

  5. def andThen[C](f: SplitEpi[B, C]): Wedge[A, C]

    Compose with another SplitEpi.

  6. def andThen[C](f: SplitMono[B, C]): SplitMono[A, C]

    Compose with another SplitMono.

  7. def asFold: Fold[A, B]

    View this SplitEpi as a Fold.

  8. def asGetter: Getter[A, B]

    View this SplitMono as a Getter.

  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def asWedge: Wedge[A, B]

    View this SplitMono as a Wedge.

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. val get: (A) => B
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  15. def imapA[C](f: (A) => C, g: (C) => A): SplitMono[C, B]

    SplitMono is an invariant functor over A.

  16. def imapB[C](f: (C) => B, g: (B) => C): SplitMono[A, C]

    SplitMono is an invariant functor over B.

  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def modify(f: (B) => B): (A) => A

    Modify the target of the SplitMono using a function.

  19. def modifyF[F[_]](f: (B) => F[B])(a: A)(implicit arg0: Functor[F]): F[A]

    Modify the target of the SplitMono using Functor.

  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. 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.

  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. def productElementNames: Iterator[String]
    Definition Classes
    Product
  25. def reverse: SplitEpi[B, A]

    Swapping get and reverseGet yields a SplitEpi.

  26. val reverseGet: (B) => A
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped