[Haskell-cafe] Generalizing unionWithKey, unionWith, ...

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue May 28 12:32:09 CEST 2013


Jose A. Lopes <jose.lopes <at> ist.utl.pt> writes:

>     unionWith :: Ord k => (a -> b -> c) -> Map k a -> Map
>     k b -> Map k c

what should be the result of

unionWith undefined (M.singleton False 42) (M.singleton True "bar")  ?

perhaps you mean intersectionWith, which already has the type you want.

- J.W.





More information about the Haskell-Cafe mailing list