<p dir="ltr">I was just thinking about refactoring some code to a tree fold—I had assumed it was in the library already, and only realized it wasn't when I saw this thread.</p>
<p dir="ltr">Definite +1.</p>
<div class="gmail_quote">On May 18, 2016 8:28 AM, <<a href="mailto:amindfv@gmail.com">amindfv@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>+1</div><div><br></div><div>Tom</div><div><br></div><div><br>El 18 may 2016, a las 08:55, Jake McArthur <<a href="mailto:jake.mcarthur@gmail.com" target="_blank">jake.mcarthur@gmail.com</a>> escribió:<br><br></div><blockquote type="cite"><div><p dir="ltr">+1 from me as well. I think I'm unlikely to ever turn down a straightforward catamorphism or anamorphism.</p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, May 18, 2016, 8:52 AM Alp Mestanogullari <<a href="mailto:alpmestan@gmail.com" target="_blank">alpmestan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">+1, have implemented it in a few occasions already.<br></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 17, 2016 at 11:03 PM, David Feuer <span dir="ltr"><<a href="mailto:david.feuer@gmail.com" target="_blank">david.feuer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Daniel Wagner would like to add the following straightforward function<br>
to Data.Tree. I think this is a grand idea.<br>
<br>
foldTree :: (a -> [b] -> b) -> Tree a -> b<br>
foldTree f = go<br>
where<br>
go (Node x ts) = f x (map go ts)<br>
_______________________________________________<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-bin/mailman/listinfo/libraries</a><br>
</blockquote></div><br><br clear="all"><br></div><div class="gmail_extra">-- <br><div>Alp Mestanogullari</div>
</div>
_______________________________________________<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-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Libraries mailing list</span><br><span><a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a></span><br><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a></span><br></div></blockquote></div><br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">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-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div>