Decomposition and normalisation - #10
Conversation
|
U know we have talked about it, I just did not know, if it fits there an where? Should I move it? |
|
Not sure if you are aware. But So if you define About |
|
@pevnak lets keep normalization here and move |
| propname(::PropertyLens{name}) | ||
|
|
||
| returns the name of the propery lens | ||
| ```julia |
There was a problem hiding this comment.
| ```julia | |
| ```jldoctest``` | |
| Similar below. |
|
|
||
|
|
||
| """ | ||
| normalise(optic) |
There was a problem hiding this comment.
Lets spell it the American way normalize to be consistent with julia base.
|
|
||
|
|
||
| """ | ||
| decompose(optic) |
There was a problem hiding this comment.
Should be moved to CompositionsBase.jl
jw3126
left a comment
There was a problem hiding this comment.
Thanks looks good overall, just some minor remarks. Also, we should add a test, that normalize yields the compiler preferred composition order (I think this might be violated with your current implementation):
https://github.com/JuliaObjects/Accessors.jl/blob/master/test/perf.jl
|
@pevnak no idea if this is still relevant for you, but I added decompose here JuliaFunctional/CompositionsBase.jl#9 |
|
Is any part of this PR relevant now that |
Hi,
these are implementations of those two functions we have discussed in the Setfield thread.
They works as
and
I have add docs and tests.