<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
            <div>When I think about a data structure that needs to be traversed in both directions, I immediately think of a zipper.<br><a href="https://ferd.ca/yet-another-article-on-zippers.html" class="">https://ferd.ca/yet-another-article-on-zippers.html</a><br></div><div><br></div><div><br></div><div>It might not be appropriate, it's just where my mind goes. </div>
            
            <div id="yahoo_quoted_6106268669" class="yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Thursday, September 21, 2017, 10:24:17 AM EDT, Grzegorz Junka <list1@gjunka.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="yiv6291338703"><html><head></head><div>
    <p>Many thanks to all for your responses and suggestions.</p>
    <p>To answer your question Richard, I don't actually need a cyclical
      structure. As I mentioned, this is a simplification of a more
      specific problem. I didn't want to describe all the specifics to
      ask a question. I need to design a tree, a variant of a HAMT tree,
      but which can be traversed in both directions, from the root to
      leafs and from leafs to the root (independently, i.e. starting
      from a reference to a leaf rather than recursively). Tuples that
      reference each other is one solution but not the only one
      fortunately, i.e. I can add ids to each node and use another data
      structure to store the mapping id-node, then store the id of the
      parent in the child.</p>
    <p>Thank you for the pointer to the book.<br clear="none">
    </p>
    <p>GrzegorzJ<br clear="none">
    </p>
    <br clear="none">
    <div class="yiv6291338703yqt8130804398" id="yiv6291338703yqt71148"><div class="yiv6291338703moz-cite-prefix">On 18/09/2017 00:53, Richard A. O'Keefe
      wrote:<br clear="none">
    </div>
    <blockquote type="cite">On
      further reflection, I suppose I should ask: <br clear="none">
       Why is it that you think you need cyclic structures? <br clear="none">
       What do you actually want to *do* with them? <br clear="none">
      <br clear="none">
      As a matter of curiosity, have you read Okasaki's <br clear="none">
      book on functional data structures? <br clear="none">
      <br clear="none">
      (Didn't someone convert Okasaki's Edison library <br clear="none">
      to Erlang at some point?  What happened to that?) <br clear="none">
      _______________________________________________ <br clear="none">
      erlang-questions mailing list <br clear="none">
      <a rel="nofollow" shape="rect" class="yiv6291338703moz-txt-link-abbreviated" ymailto="mailto:erlang-questions@erlang.org" target="_blank" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
      <br clear="none">
      <a rel="nofollow" shape="rect" class="yiv6291338703moz-txt-link-freetext" target="_blank" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
      <br clear="none">
    </blockquote></div>
    <br clear="none">
  </div></html></div><html><div class="yqt8130804398" id="yqt80966"><body>_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a shape="rect" ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none"><a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></body></div></html></div>
                </div>
            </div></div></body></html>