Thread of 2 posts

jump to replies

Is it just me, or is this a weird post by Sandy Maguire?

The Maybe formulation is incorrect -

`unionWith :: (Maybe a -> Maybe b -> c) -> Map k a -> Map k b -> Map k c`

And that the version with `These` is the right one to use -

`unionWith :: (These a b -> c) -> Map k a -> Map k b -> Map k c`

But then Sandy immediately discards this formulation, and instead builds up a monoidal strawman, which is equivalent to the Maybe formulation, to knock down. To get some law that doesn't hold anyway?

https://reasonablypolymorphic.com/blog/api-analysis/

#Haskell

Open thread at this post

2 replies

back to top