tobgu/pyrsistent — pull request #3 by radix (2014-09-21 06:25:39+00:00)
Title: Persistent Bags / Multisets

Here's an implementation of a persistent bag/multiset, using a pmap to count elements.

This is pretty similar to collections.Counter in the Python stdlib, but less leaky :)

If you think it's not appropriate for pyrsistent, that's fine, I can release it as a separate library.

Since the PBag class is private (as are PMap, PVector etc) I decided to prefix it with an underscore.