inside

open fun <B> inside(field: Traversal<A, B>, f: Copy<B>.() -> Unit)(source)

Declares a block in which all optics are nested within the given field. Instead of:

x.copy {
X.a.this set "A"
X.a.that set "B"
}

you can write:

x.copy {
inside(X.a) {
A.this set "A"
A.that set "B"
}
}