From: "Stefan Monnier" <firstname.lastname@example.org>
Subject: Re: Imperative list operations
Date: 15 Sep 1999 10:35:23 -0400
>>>>> "Steve" == Steve Stevenson <email@example.com> 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/
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:25 MET