arrow-optics / arrow.optics / PSetter
interface PSetter<S, T, A, B> :
PSetterOf
<S, T, A, B>
choice | Join two PSetter with the same targetopen infix fun <U, V> choice(other: PSetter <U, V, A, B>): PSetter <Either<S, U>, Either<T, V>, A, B> |
compose | Compose a PSetter with a PSetteropen infix fun <C, D> compose(other: PSetter <A, B, C, D>): PSetter <S, T, C, D> Compose a PSetter with a POptional open infix fun <C, D> compose(other: POptional <A, B, C, D>): PSetter <S, T, C, D> Compose a PSetter with a PPrism open infix fun <C, D> compose(other: PPrism <A, B, C, D>): PSetter <S, T, C, D> Compose a PSetter with a PLens open infix fun <C, D> compose(other: PLens <A, B, C, D>): PSetter <S, T, C, D> Compose a PSetter with a PIso open infix fun <C, D> compose(other: PIso <A, B, C, D>): PSetter <S, T, C, D> Compose a PSetter with a PTraversal open infix fun <C, D> compose(other: PTraversal <A, B, C, D>): PSetter <S, T, C, D> |
lift | Lift a function f: (A) -> B to the context of S: (S) -> T``open fun lift(f: (A) -> B): (S) -> T` |
modify | Modify polymorphically the focus of a PSetter with a function f.abstract fun modify(s: S, f: (A) -> B): T |
plus | Plus operator overload to compose optionalsopen operator fun <C, D> plus(o: PSetter <A, B, C, D>): PSetter <S, T, C, D> open operator fun <C, D> plus(o: POptional <A, B, C, D>): PSetter <S, T, C, D> open operator fun <C, D> plus(o: PPrism <A, B, C, D>): PSetter <S, T, C, D> open operator fun <C, D> plus(o: PLens <A, B, C, D>): PSetter <S, T, C, D> open operator fun <C, D> plus(o: PIso <A, B, C, D>): PSetter <S, T, C, D> open operator fun <C, D> plus(o: PTraversal <A, B, C, D>): PSetter <S, T, C, D> |
set | Set polymorphically the focus of a PSetter with a value b.open fun set(s: S, b: B): T |
codiagonal | PSetter that takes either S or S and strips the choice of S.fun <S> codiagonal(): Setter <Either<S, S>, S> |
fromFunctor | Create a PSetter from a arrow.Functorfun <F, A, B> fromFunctor(FF: Functor<F>): PSetter <Kind<F, A>, Kind<F, B>, A, B> |
id | fun <S> id(): PSetter <S, S, S, S> |
some | DSL to compose a Prism with focus arrow.core.Some with a Setter with a focus of Option<S>val <T, S> Setter <T, Option<S>>.some: Setter <T, S> |
at | DSL to compose At with a Setter for a structure S to focus in on A at given index I.fun <T, S, I, A> Setter <T, S>.at(AT: At <S, I, A>, i: I): Setter <T, A> |
every | DSL to compose Each with a Setter for a structure S to see all its foci Afun <T, S, A> Setter <T, S>.~~every~~(EA: Each <S, A>): Setter <T, A> DSL to compose Traversal with a Setter for a structure S to see all its foci A fun <T, S, A> Setter <T, S>.every(TR: Traversal <S, A>): Setter <T, A> |
index | DSL to compose Index with a Setter for a structure S to focus in on A at given index Ifun <T, S, I, A> Setter <T, S>.index(ID: Index <S, I, A>, i: I): Setter <T, A> |
Do you like Arrow?
✖