arrow-optics / arrow.optics.dsl / at

at

fun <T, S, I, A> Lens<T, S>.at(AT: At<S, I, A>, i: I): Lens<T, A>

DSL to compose At with a Lens for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Lens with a focus in S

Return Lens with a focus in A at given index I.

fun <T, S, I, A> Iso<T, S>.at(AT: At<S, I, A>, i: I): Lens<T, A>

DSL to compose At with an Iso for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Iso with a focus in S

Return Lens with a focus in A at given index I.

fun <T, S, I, A> Prism<T, S>.at(AT: At<S, I, A>, i: I): Optional<T, A>

DSL to compose At with a Prism for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Prism with a focus in S

Return Optional with a focus in A at given index I.

fun <T, S, I, A> Optional<T, S>.at(AT: At<S, I, A>, i: I): Optional<T, A>

DSL to compose At with an Optional for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Optional with a focus in S

Return Optional with a focus in A at given index I.

fun <T, S, I, A> Getter<T, S>.at(AT: At<S, I, A>, i: I): Getter<T, A>

DSL to compose At with a Getter for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Getter with a focus in S

Return Getter with a focus in A at given index I.

fun <T, S, I, A> Setter<T, S>.at(AT: At<S, I, A>, i: I): Setter<T, A>

DSL to compose At with a Setter for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Setter with a focus in S

Return Setter with a focus in A at given index I.

fun <T, S, I, A> Traversal<T, S>.at(AT: At<S, I, A>, i: I): Traversal<T, A>

DSL to compose At with a Traversal for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Traversal with a focus in S

Return Traversal with a focus in A at given index I.

fun <T, S, I, A> Fold<T, S>.at(AT: At<S, I, A>, i: I): Fold<T, A>

DSL to compose At with a Fold for a structure S to focus in on A at given index I.

Parameters

AT - At instance to provide a Lens to zoom into S at I

i - index I to zoom into S and find focus A

Receiver Fold with a focus in S

Return Fold with a focus in A at given index I.