Chris Angus:
> 
> Would it not be better to tag a start point then we can manipulate this
> easier
> and move it back to a singly linked list etc.
> 
> data Db a = Dd (Db a) a (Db a)
>           | DStart (Db a) a (Db a)
> 
> ...

Well, I am sufficiently old to confess that one of my favourite OO
languages, and the one where I found doubly-linked lists for the first
time was ...

Yes, Simula-67.

Actually *they did* that. A "node" had two sub-classes, the link and the
head, and the link chain was doubly attached to the head. This structure
has been havily used for the maintenance of the co-routine bedlam
exploited in simulation programs.

The idea of double lists was to permit a fast two-directional
navigation,
and the ease of insertion/deletion.

But in Haskell, where the beasts are not mutable:

... Actually, has anybody really used them for practical purposes?

Jerzy Karczmarczuk
Caen, France

Reply via email to