To: caml-list@inria.fr
From: "Stefan Monnier" <monnier+lists/caml/news/@tequila.cs.yale.edu>
Subject: Re: Imperative list operations
Date: 15 Sep 1999 10:35:23 -0400
>>>>> "Steve" == Steve Stevenson <steve@cs.clemson.edu> writes:
> I need a double-ended queue implementation. The lists
> can get very long, so I would like to use imperative operations to
> change the links.
Since my O'Caml is very approximate, I'll answer with a non-answer:
have you tried a purely functional (but asymptotically efficient)
deque ? Those don't suffer from the length of the queue.
Chris Okasaki has an interesting set of such purely functional data-structures,
with sample code in SML (and/or Haskell) which should be easy to translate to
O'Caml. Check out, for example http://www.cs.columbia.edu/~cdo/jfp95/
Stefan
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:25 MET