<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/11/c7d99f81f6a9a73503416cb0a2eae8ff"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-11-08T09:16:09"
  subject="Re: [Caml-list] removing an item from a list efficiently"
  prev="2003/11/91026f5c9a6c85960c1b03109f47fd47"
  next="2003/11/7c99500ef454714de5976058df1dee4b"
  prev-in-thread="2003/11/abff800f267cf8fbd094693a8b321bf2"
  next-in-thread="2003/11/46359372e8c3fe20eb2053f0ae783117"
  prev-thread="2003/11/140c9fadd8e2355539503a016bc1e217"
  next-thread="2003/11/810f9d2fb53a5d64dcf1e65d5252ea26"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] removing an item from a list efficiently">
<msg 
  url="2003/11/8bac1133214edc5aaff0c5dae8053b9e"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-11-07T09:32:27"
  subject="[Caml-list] removing an item from a list efficiently">
<msg 
  url="2003/11/35bb4778a8df1590c7a455f7ccde6d41"
  from="jrouquie@e..."
  author="jrouquie@e..."
  date="2003-11-07T09:49:13"
  subject="Re: [Caml-list] removing an item from a list efficiently">
</msg>
<msg 
  url="2003/11/1b659ba377258e8559706506c2db6f58"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-11-07T12:46:23"
  subject="Re: [Caml-list] removing an item from a list efficiently">
<msg 
  url="2003/11/abff800f267cf8fbd094693a8b321bf2"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-11-08T08:50:00"
  subject="Re: [Caml-list] removing an item from a list efficiently">
<msg 
  url="2003/11/c7d99f81f6a9a73503416cb0a2eae8ff"
  from="Stefano Zacchiroli &lt;zack@b...&gt;"
  author="Stefano Zacchiroli"
  date="2003-11-08T09:16:09"
  subject="Re: [Caml-list] removing an item from a list efficiently">
<msg 
  url="2003/11/46359372e8c3fe20eb2053f0ae783117"
  from="Dustin Sallings &lt;dustin@s...&gt;"
  author="Dustin Sallings"
  date="2003-11-09T01:13:50"
  subject="Re: [Caml-list] removing an item from a list efficiently">
</msg>
</msg>
<msg 
  url="2003/11/32140dc8d0aefcc1084f7d71249259ed"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-11-08T10:59:15"
  subject="Re: [Caml-list] removing an item from a list efficiently">
<msg 
  url="2003/11/084dc18069992dc2bb611418ba46e2c0"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-11-08T11:02:32"
  subject="Re: [Caml-list] removing an item from a list efficiently">
</msg>
</msg>
<msg 
  url="2003/11/c3c337dbb5441234608baefc94d522c1"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-11-08T18:00:04"
  subject="Re: [Caml-list] removing an item from a list efficiently">
</msg>
</msg>
</msg>
<msg 
  url="2003/11/184f6a940f38b467106a0ab10f62e65d"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-11-07T15:51:55"
  subject="Re: [Caml-list] removing an item from a list efficiently">
</msg>
</msg>
</thread>

<contents>
[ Please don't Cc:-me, I'm subscribed to this list, as my
  Mail-Followup-To header can confirm ]

On Sat, Nov 08, 2003 at 12:49:48AM -0800, Dustin Sallings wrote:
&gt; 	This is really what I was asking, whether ocaml lists could be 
&gt; appropriate.
&gt; 
&gt; 	I'm having difficulty figuring out how to implement a double linked 
&gt; list, though.  I want something like this:

I still think that lists, no matter if single or doubly linked aren't a
good structure for your cache, anyway ...

&gt; type 'a link = Nothing | Link of 'a t;;
&gt; type 'a t = {
&gt;     data: 'a;
&gt;     mutable prev: 'a link;
&gt;     mutable next: 'a link;
&gt; };;
&gt; 	But, link and t don't know about each other.  How does one go about 
&gt; doing this kind of thing in ocaml?

What do you mean? The above declaration isn't correct just because you
have to use an "and" instead of a "type" for the second declaration to
have two mutual recursive types. I don't know if this is really what
you're asking ...

Cheers.

-- 
^Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy$
^zack@{cs.unibo.it,debian.org,bononia.it} -- http://www.bononia.it/zack$
^Frequentando il mio maestro mi ero reso conto [.] che la logica poteva$
^servire a molto a condizione di entrarci dentro e poi di uscirne -Adso$

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

