Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Perform the complement operation on multisets
gives the elements in listall that are in excess of those in all the listi.
gives an Association where the keys are the union of the keys in the associations assocall and associ, and the values are the greater of the difference of the values in assocall and the sum of the values in the associ and 0.
Find which elements in the first list are not in any of the subsequent lists:
Multisets as Association of counts:
MultisetComplement works with any head, not just List:
Compare to Complement:
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License