<span></span>On Friday, December 7, 2012, Thomas Schilling  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7 December 2012 09:25, Erik Hesselink &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;hesselink@gmail.com&#39;)">hesselink@gmail.com</a>&gt; wrote:<br>

&gt; There is no need to define whenJust, since it is just a specialization<br>
&gt; of forM_ from Data.Foldable.<br>
<br>
I don&#39;t know if that&#39;s such a good argument.  I prefer my code<br>
readable -- too much abstraction can have a seriously bad effect on<br>
that.  As a simple rule, if the user has to do type inference in their<br>
head, readability suffers.<br>
<br>
In this case, &quot;forM_&quot; implies we&#39;re iterating over something container<br>
like, &quot;whenJust&quot; means &quot;I want to do something if this thing yielded a<br>
result&quot;. It depends on the context whether a &quot;Maybe&quot; is behaving more<br>
container-like or is indicating the presence of a result where there<br>
may not have been one.<br>
</blockquote><div><br></div><div>I don&#39;t have this problem, but I guess that&#39;s just personal. But in general I&#39;m not in favor of adding specialized versions of generalized functions.</div><div><br></div><div>
Erik </div>