@optics data class Foo(x: Int, y: Double)
val fooStart: Foo = Foo(1, 2.0)
// Foo.x is Lens<Foo, Int>; Foo.y is Lens<Foo, Double>
// `.set` is not the correct method here; the idea is that this just closes over the value to set in the structure
// and the structure to be modified will be supplied later
val setter1: (Foo) -> Foo = Foo.x.set(3)
val setter2: (Foo) -> Foo = Foo.y.set(4.0)
(setter1 compose setter2)(fooStart) == Foo(3, 4.0)
The idea being that all of the sets/updates would be created and then applied in bulk over the original structure.