Proposal: add fusion RULES for Data.Map.mapMaybe

Joachim Breitner mail at joachim-breitner.de
Thu Nov 21 19:30:27 UTC 2013


Hi,

Am Mittwoch, den 20.11.2013, 16:40 +0900 schrieb Akio Takano:
> Currently mapMaybe does not fuse at all. The attached patch implements
> necessary rules for fold/build fusion in both sides (the result and
> the second argument) to happen. When fusion does not happen, the
> function should behave exactly the same as before.

+1. Also, the code seems to be correct (at least quickcheck tells me
so).


Thanks for the contribution,
Joachim

-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0x4743206C
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131121/15cb698f/attachment.sig>


More information about the Libraries mailing list