I use lenses for retrieving and editing the state of a Compose form.
This state can contain a list of subforms (substates).
I've created some inputs that receive a lens as a param and are able to update the state according to the lens and the parent lens if is a nested form. However, in the case of the list I have an optional not a lens. I need somehow to unify this.
The idea is that I will do something like:
model.list.eachIndexed{i,v ->
val parentLens = Model.list.index(Index.list(),i)
myInput(parentLens, SubModel::prop...)
}