We can abstract over the Category being used to mix indexed and regular optics. Varying the monoid of indexes lets us keep all indices, only the first, only the last, etc.
Here is a prototype I made:
http://try.purescript.org/?backend=thermite&gist=76df2c01deeaa6c0cafe52655e710789
This seems worth looking into, even if only to figure out what the trade-offs are.
We can abstract over the
Categorybeing used to mix indexed and regular optics. Varying the monoid of indexes lets us keep all indices, only the first, only the last, etc.Here is a prototype I made:
http://try.purescript.org/?backend=thermite&gist=76df2c01deeaa6c0cafe52655e710789
This seems worth looking into, even if only to figure out what the trade-offs are.