To flatten lens composition, you can prespecify the data the lens with be applied to by constructing an objectoscope. These can be integrated easily with normal data pipelines.
oscope(d, l = id_l)
d | The data for interest |
---|---|
l | The lens to bind the data to. Defaults to the identity lens |
#> $a #> [1] 5 #> #> $b #> [1] 10 2 3 #> #> $c #> [1] 8 #>