<div dir="ltr"><div>I'm not sure I propose adding it to base either :)<br><br></div>Relaxing `t` as the output is certainly correct. I'm not sure if there is a correct choice between Alternative or Monoid. That would be an indicator that a generic function of this form is arbitrarily opinionated.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 3:18 PM, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On Thu, 20 Oct 2016, <a href="mailto:evan@evan-borden.com" target="_blank">evan@evan-borden.com</a> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've given the performance hypothesis a test and it seems that a generic implementation outperforms the list<br>
implementation. I'm not terribly sure why this is the case, but I also haven't dumped core.<br>
<br>
Implementation and bench: <a href="https://github.com/eborden/partition" rel="noreferrer" target="_blank">https://github.com/eborden/par<wbr>tition</a><br>
</blockquote>
<br></span>
I do not propose to add this to 'base', but if you are after a generic implementation why is the input container type the same as the output type (both 't')? Why not using Alternative.<|> instead of Monoid.<> ?<br>
</blockquote></div><br></div>