That’s because (elem) will coerce its righthand side parameter to a Bag. If the count in a Bag goes to 0, the element doesn’t exist, and therefore returns False.
> On 16 Sep 2016, at 23:17, Brandon Allbery <allber...@gmail.com> wrote: > > > On Fri, Sep 16, 2016 at 5:04 PM, yary <not....@gmail.com> wrote: > Having (elem) return False when the value of a Map element is 0 confuses me. > > Me too, I disliked it the moment you pointed it out. I think that behavior is > intended for Bags, I am not sure it has any business being in Sets. > > > -- > brandon s allbery kf8nh sine nomine associates > allber...@gmail.com ballb...@sinenomine.net > unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net