Skip to content

Intersection on lists is not symmetric #1241

@nvbeusekom

Description

@nvbeusekom

It seems that the intersection operator for lists is not symmetric when it is given a list with multiple occurences.
For example:

rascal>[1,1,2] & [1,2]
list[int]: [1,1,2]

rascal>[1,2] & [1,1,2]
list[int]: [1,2]

Here the first call should actually give [1,2] since 1 only occurs once in the second list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions