[Haskell-beginners] mapKeysMaybe

Dennis Raddle dennis.raddle at gmail.com
Fri Nov 6 07:29:36 UTC 2015

Can someone give me a clever way to implement mapKeysMaybe, defined as

Ord k => (k -> Maybe k) -> Map k a -> Map k a

where the transformed keys that evaluate to Just are the only ones kept?

I am thinking this will probably help me understand a new type, like
traversable or something.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151105/3a0857ff/attachment.html>

More information about the Beginners mailing list