<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>(Moving to haskell-cafe@ -- haskell@ is only for announcements)</div><div><br></div><div><br>El 19 jul 2016, a las 19:44, David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> escribió:<br><br></div><blockquote type="cite"><div><p dir="ltr">A zipper is a good way to separate the search from the replacement. But the problem at hand does not require such a separation! If you don't need that, a zipper seems like overkill.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Jul 19, 2016 7:39 PM, "Carl Folke Henschen Edman" <<a href="mailto:carledman@gmail.com">carledman@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="quoted-text"><div class="gmail_quote">On Tue, Jul 19, 2016 at 6:13 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span style="font-size:12.8px">Using a zipper will not get you very far here. The best way would</span><br style="font-size:12.8px"><span style="font-size:12.8px">likely be to replace the list with a balanced search tree. </span><br></blockquote></div><div class="gmail_extra"><br></div></div>That depends on the pattern of access and usage.  For some a zippered list will outperform a self-balancing tree and vice versa.  For others a zippered tree, or something else, will beat either.  But when seeing the pattern of changing a single element in the middle of a list, a zippered list is the first improved data structure that comes to mind.<font color="#888888"><br><br clear="all"><div><div data-smartmail="gmail_signature"><br>    Carl Edman</div></div>
</font></div></div>
</blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Haskell mailing list</span><br><span><a href="mailto:Haskell@haskell.org">Haskell@haskell.org</a></span><br><span><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell</a></span><br></div></blockquote></body></html>