# File multiset.rb, line 352 def map_with! self.to_hash.each_pair do |item, count| self.delete(item, count) val = yield(item, count) self.add(val[0], val[1]) end self end