<div dir="ltr">Apologies, the subject of my previous email was wrong. It is about Data.Maybe.mapMaybe, not Data.Map.mapMaybe.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 4:40 PM, Akio Takano <span dir="ltr"><<a href="mailto:tkn.akio@gmail.com" target="_blank">tkn.akio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>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.<br>

<br>I ran some benchmarks, testing cases where fusion does and does not happen:<br><br><a href="http://htmlpreview.github.io/?https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/out.html" target="_blank">http://htmlpreview.github.io/?https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/out.html</a><br>

<br>The benchmark code is:<br><br><a href="https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/main.hs" target="_blank">https://github.com/takano-akio/mapmaybe-benchmarks/blob/master/main.hs</a><br><br>Discussion period: 2 weeks.<br>

<br>Thank you,<br>Takano Akio<br></div>
</blockquote></div><br></div></div>