You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This arises because of the associativity of ComposedFunction -- for example in s[1].a.p the lens can be either ComposedFunction(ComposedFunction(.p, .a), .[1])) or it could be ComposedFunction(.p, ComposedFunction(.a, .[1])) (full functions not shown for simplicity).
There are two ways to handle this. One is to carefully disambiguate all cases with lots of if/else or multiple dispatch methods. The other is to enforce normalisation such that ComposedFunction can only have ComposedFunction as its outer optic (for example) and not as its inner optic. That would require us to either write our own ComposedFunction or upstream it.
The text was updated successfully, but these errors were encountered:
We could indeed, the only downside would be that would happen every time we construct a VarName. I think I originally only intended to do it on the prefix / unprefix functions (because I think that's the only place where this can happen), but maybe that's a micro-optimisation, and maybe doing it in an inner constructor is also more future-proof.
Uh oh!
There was an error while loading. Please reload this page.
This arises because of the associativity of ComposedFunction -- for example in
s[1].a.p
the lens can be eitherComposedFunction(ComposedFunction(.p, .a), .[1]))
or it could beComposedFunction(.p, ComposedFunction(.a, .[1]))
(full functions not shown for simplicity).There are two ways to handle this. One is to carefully disambiguate all cases with lots of if/else or multiple dispatch methods. The other is to enforce normalisation such that ComposedFunction can only have ComposedFunction as its outer optic (for example) and not as its inner optic. That would require us to either write our own ComposedFunction or upstream it.
The text was updated successfully, but these errors were encountered: