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

Jose A. Lopes jose.lopes at ist.utl.pt
Tue May 28 12:43:45 CEST 2013


Yes! intersectionWith is just what I needed.

In any case, coming back to your example, why would
you want to use undefined in that particular case?

What makes it an interesting example ?

Best,
Jose

On 28-05-2013 12:32, Johannes Waldmann wrote:
> 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.
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-- 
José António Branquinho de Oliveira Lopes
Instituto Superior Técnico
Technical University of Lisbon




More information about the Haskell-Cafe mailing list