Companion

Functions

Link copied to clipboard
fun <S> codiagonal(): Lens<Either<S, S>, S>

PLens that takes either S or S and strips the choice of S.

Link copied to clipboard
fun <S> id(): PIso<S, S, S, S>
Link copied to clipboard
operator fun <S, T, A, B> invoke(get: (S) -> A, set: (S, B) -> T): PLens<S, T, A, B>

Invoke operator overload to create a PLens of type S with target A. Can also be used to construct Lens

Link copied to clipboard

Lens to operate on the head of a NonEmptyList

Link copied to clipboard

Lens to operate on the tail of a NonEmptyList

Link copied to clipboard
fun <A, B> pairFirst(): Lens<Pair<A, B>, A>

Lens to focus into the first value of a Pair

Link copied to clipboard
fun <A, B, R> pairPFirst(): PLens<Pair<A, B>, Pair<R, B>, A, R>

PLens to focus into the first value of a Pair

Link copied to clipboard
fun <A, B, R> pairPSecond(): PLens<Pair<A, B>, Pair<A, R>, B, R>

PLens to focus into the second value of a Pair

Link copied to clipboard
fun <A, B> pairSecond(): Lens<Pair<A, B>, B>

Lens to focus into the second value of a Pair

Link copied to clipboard
fun <A, B, C> tripleFirst(): Lens<Triple<A, B, C>, A>

Lens to focus into the first value of a Triple

Link copied to clipboard
fun <A, B, C, R> triplePFirst(): PLens<Triple<A, B, C>, Triple<R, B, C>, A, R>

PLens to focus into the first value of a Triple

Link copied to clipboard
fun <A, B, C, R> triplePSecond(): PLens<Triple<A, B, C>, Triple<A, R, C>, B, R>

PLens to focus into the second value of a Triple

Link copied to clipboard
fun <A, B, C, R> triplePThird(): PLens<Triple<A, B, C>, Triple<A, B, R>, C, R>

PLens to focus into the third value of a Triple

Link copied to clipboard
fun <A, B, C> tripleSecond(): Lens<Triple<A, B, C>, B>

Lens to focus into the second value of a Triple

Link copied to clipboard
fun <A, B, C> tripleThird(): Lens<Triple<A, B, C>, C>

Lens to focus into the third value of a Triple