[Haskell-cafe] ANN: signed-multiset-0.1

wren ng thornton wren at freegeek.org
Fri Apr 20 04:44:07 CEST 2012

On 4/19/12 7:02 PM, Richard O'Keefe wrote:
> For a specific example, I haven't the faintest intuition about
> what 'map' should do.  Suppose we have
> 	{(k1)x1, (k2)x2}
> and f x1 == f x2 = y.  Should the value of map f {...} be
> {(k1+k2)y} or {(k1`max`k2)y} or what?

Good question. I'd suppose that they should be parametrized by any 
(Abelian?) group on the weights/multiplicities, where (+) is the 
canonical one since we're talking about "negative" membership. Though 
it'd be nice to get clarification, and to actually have the group/etc be 
a parameter (i.e., by type class constraint) rather than hard-coded into 
the structure.

Live well,

More information about the Haskell-Cafe mailing list