<div dir="auto"><div>It is fold, although fold is not so great for lists in this context. It's also foldl' union Set.empty, which is better for lists, and probably also for balanced trees. I initially thought that we should surely generalize, but now another alternative comes to mind: remove. As a containers maintainer, I believe we should either:</div><div dir="auto"><br></div><div dir="auto">1. Generalize as proposed, or</div><div dir="auto">2. Deprecate and remove.</div><div dir="auto"><br></div><div dir="auto">I'm currently somewhat in favor of the second option.<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Feb 3, 2018 9:42 AM, "Henning Thielemann" <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text"><br>
On Sat, 3 Feb 2018, Johannes Waldmann wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I propose this change for containers:<br>
<br>
have: unions :: [ Set a ] -> Set a<br>
want: unions :: Foldable f => f (Set a) -> Set a<br>
</blockquote>
<br></div>
That's Foldable.fold.<div class="elided-text"><br>
______________________________<wbr>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/libraries</a><br>
</div></blockquote></div><br></div></div></div>