<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 28, 2012 at 8:30 AM, Gershom Bazerman <span dir="ltr">&lt;<a href="mailto:gershomb@gmail.com" target="_blank">gershomb@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/28/12 1:20 AM, Michael Snoyman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
+1 for moving semigroups into the platform, but what&#39;s the motivation for removing First and Last from Data.Monoid?<br>
<br>
</blockquote>
<br></div>
Because they&#39;re properly represented as semigroups too, just like Min and Max (i.e. they don&#39;t behave sensibly &quot;out of the box&quot; on empty lists). The semigroups package already provides the proper types and instances. And just like Min and Max, the semigroups package lets you &quot;lift&quot; its First and Last into Monoids with the Option type.<span class="HOEnZb"><font color="#888888"><br>


<br></font></span></blockquote><div><br></div><div style>Just because such a lifting is possible doesn&#39;t mean that it will be intuitive or obvious to new users. (I wouldn&#39;t know how to make this switch, for example.) First and Last as currently provided by the Data.Monoid module provide some very useful functionality; I&#39;ve used them in the past for such things as representing nested config files. I wouldn&#39;t want to provide a default value for the options, but want to use the first (or last) value in the file.</div>

<div style><br></div><div style>So count me as -1 to modifications to First and Last.</div><div style><br></div><div style>Michael</div></div></div></div>