July 29, 2014
12:38 a.m.
It seems it would be valuable to parallel the behaviour of operators already in place for collections.
Mappings aren't collections. In set theory, of course, they are represented as *appropriately restricted* collections, but the meaning of "+" as applied to mappings in mathematics varies. For functions on the same domain, there's usually an element-wise meaning that's applied. For functions on different domains, I've seen it used to mean "apply the appropriate function on the disjoint union of the domains".
I don't think there's an obvious winner in the competition among the various meanings.
I mistyped. It should have read " ... the behaviour in place for collections.Counter" It does define "+" and "|" operations. -Alexander