
28 May
2013
28 May
'13
11:02 a.m.
Dne 28.5.2013 12:32, Johannes Waldmann napsal(a):
Jose A. Lopes
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 the generalized signature should be instead:
```haskell unionWith :: Ord k => (Maybe a -> Maybe b -> c) -> Map k a -> Map k b -> Map k c ``` (The function would always get at least one `Just`.) But this functionality can be achieved using `map`s and the current `unionWith`. P.P.