There are several issues with the way intersect for submodules is documented:
- In the first sentence of the docstring it should probably read "intersection of the modules
M and N"
- The example following the docstring doesn't make sense. (The final result is
Any[].) To make it work, one has to say
N1, _ = sub(M, [m, n])
N2, _ = sub(M, [m])
- The result of
intersect is not just a submodule, but a pair (I, f), where f probably is the inclusion of the intersection I into N1.
By the way, I think it would make sense to have intersect for an arbitrary number of arguments, maybe with an init keyword argument for the case of zero submodules. (The default intersect from Julia Base doesn't work here.)
There are several issues with the way
intersectfor submodules is documented:MandN"Any[].) To make it work, one has to sayintersectis not just a submodule, but a pair(I, f), wherefprobably is the inclusion of the intersectionIintoN1.By the way, I think it would make sense to have
intersectfor an arbitrary number of arguments, maybe with aninitkeyword argument for the case of zero submodules. (The defaultintersectfrom Julia Base doesn't work here.)