abstract
class
PIso[S, T, A, B] extends AnyRef
Abstract Value Members
-
abstract
def
modify(f: (A) ⇒ B): (S) ⇒ T
-
abstract
def
modifyF[F[_]](f: (A) ⇒ F[B])(s: S)(implicit arg0: Functor[F]): F[T]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
^<->[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]
-
final
def
^<-?[C, D](other: PPrism[A, B, C, D]): PPrism[S, T, C, D]
-
final
def
^|->[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]
-
final
def
^|->>[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
-
final
def
^|-?[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
-
final
def
asFold: Fold[S, A]
-
final
def
asGetter: Getter[S, A]
-
final
def
asInstanceOf[T0]: T0
-
final
def
asLens: PLens[S, T, A, B]
-
final
def
asOptional: POptional[S, T, A, B]
-
final
def
asPrism: PPrism[S, T, A, B]
-
final
def
asSetter: PSetter[S, T, A, B]
-
final
def
asTraversal: PTraversal[S, T, A, B]
-
def
clone(): AnyRef
-
final
def
composeFold[C](other: Fold[A, C]): Fold[S, C]
-
final
def
composeGetter[C](other: Getter[A, C]): Getter[S, C]
-
final
def
composeIso[C, D](other: PIso[A, B, C, D]): PIso[S, T, C, D]
-
final
def
composeLens[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]
-
final
def
composeOptional[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
-
final
def
composePrism[C, D](other: PPrism[A, B, C, D]): PPrism[S, T, C, D]
-
final
def
composeSetter[C, D](other: PSetter[A, B, C, D]): PSetter[S, T, C, D]
-
final
def
composeTraversal[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
val
get: (S) ⇒ A
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
reverse: PIso[B, A, T, S]
-
val
reverseGet: (B) ⇒ T
-
final
def
set(b: B): (S) ⇒ T
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
A PIso defines an isomorphism between types S, A and B, T:
get reverse.get --------------------> --------------------> S A T B <-------------------- <-------------------- reverse.reverseGet reverseGet
In addition, if f and g forms an isomorphism between A and B, i.e. if f . g = id and g . f = id, then a PIso defines an isomorphism between S and T:
S T S T | ↑ ↑ | | | | | get | | reverseGet reverse.reverseGet | | reverse.get | | | | ↓ f | | g ↓ A --------> B A <-------- B
Iso is a type alias for PIso where S = A and T = B:
type Iso[S, A] = PIso[S, S, A, A]
A PIso is also a valid Getter, Fold, PLens, PPrism, POptional, PTraversal and PSetter
the source of a PIso
the modified source of a PIso
the target of a PIso
the modified target of a PIso
IsoLaws in monocle-law module