Matthew,<br><br>I would strongly suggest taking a look on SPJ's presentation at OSCON 2007 (video at <a href="http://blip.tv/file/324976">http://blip.tv/file/324976</a>). He shows a very interesting circular list (with a zipper).<br>
<br>Since you are interested in functional data structures, Chris Okasaki's book "Purely Functional Data Structures" is a great source too!<br><br><br><br><div class="gmail_quote">On Tue, Feb 3, 2009 at 00:53, Erik de Castro Lopo <span dir="ltr"><<a href="mailto:mle%2Bcl@mega-nerd.com">mle+cl@mega-nerd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Matthew J. Williams wrote:<br>
<br>
> How would one mimic, in Haskell, a C++ circular linked list i.e.,<br>
> where the last element precedes (points to) the first?<br>
<br>
</div>Try this, "Tying the Knot":<br>
<br>
<a href="http://www.haskell.org/haskellwiki/Tying_the_Knot" target="_blank">http://www.haskell.org/haskellwiki/Tying_the_Knot</a><br>
<br>
Erik<br>
--<br>
<font color="#888888">--<br>
-----------------------------------------------------------------<br>
Erik de Castro Lopo<br>
-----------------------------------------------------------------<br>
"I consider C++ the most significant technical hazard to the survival<br>
of your project and do so without apologies." -- Alistair Cockburn<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Rafael Gustavo da Cunha Pereira Pinto<br>Electronic Engineer, MSc.<br>