Skip to content

mistakes in documentation for intersect for submodules #2433

Description

@matthias314

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions