<?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/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"
  prev="2003/11/e2fb8ff91b241e56cbb230b4a245f99d"
  next="2003/11/c1e744886a3affa901d1dcaf0e350359"
  prev-in-thread="2003/11/c7d99f81f6a9a73503416cb0a2eae8ff"
  next-in-thread="2003/11/32140dc8d0aefcc1084f7d71249259ed"
  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>

On Nov 8, 2003, at 1:16, Stefano Zacchiroli wrote:

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

	I'm using a Hashtbl for indexing the linked list which is used for 
maintaining the sequence.  It should be O(1).

&gt;&gt; type 'a link = Nothing | Link of 'a t;;
&gt;&gt; type 'a t = {
&gt;&gt;     data: 'a;
&gt;&gt;     mutable prev: 'a link;
&gt;&gt;     mutable next: 'a link;
&gt;&gt; };;
&gt;&gt; 	But, link and t don't know about each other.  How does one go about
&gt;&gt; doing this kind of thing in ocaml?
&gt;
&gt; What do you mean? The above declaration isn't correct just because you
&gt; have to use an "and" instead of a "type" for the second declaration to
&gt; have two mutual recursive types. I don't know if this is really what
&gt; you're asking ...

	It is, thank you.  The ``and'' thing was not obvious to me.  Still 
learning.

-- 
Dustin Sallings

-------------------
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>

