Commit Graph

2 Commits

Author SHA1 Message Date
Julien Fischer
5896264b9b Efficient insertion of duplicate items into bags.
library/bag.m:
    Add predicates and a function for efficiently inserting multiple copies of
    an item into a bag.

NEWS:
    Announce the above additions.

tests/hard_coded/bag_various.{m,exp}:
    Extend this test to cover the above.
2017-05-07 02:39:53 +10:00
Ondrej Bojar
63a60f056f Add functions bag.count/1, bag.count_unique/1 and predicates bag.member/2
Estimated hours taken: 1
Branch: main

Add functions bag.count/1, bag.count_unique/1 and predicates bag.member/2
and bag.member/3 to the bag module.

NEWS:
    Announce the new predicates and functions.
    Minor indentation unification.

library/bag.m:
    New functions and predicates.

tests/hard_coded/bag_various.m:
tests/hard_coded/bag_various.exp:
    A simple testcase for the new predicates, with expected results.

tests/hard_coded/Mmakefile:
    Enabled the test.
2007-03-12 02:19:31 +00:00