[Haskell-cafe] Algebraic Collections [was: OCaml list sees
haskell at sleepingsquirrel.org
Fri Oct 8 11:27:58 EDT 2004
Robert Dockins wrote:
> Actually, I've been wondering about this. If my understanding is
> correct, Haskell lists are basicly singly-linked lists of cons cells (is
> that correct?) A simple (I think) thing to do would be to make the
> lists doubly-linked and circular. That would let us do nice things like
> have O(1) primops for reverse, tail, (++) and other things that access
> lists at the end. However, I'm still pretty new to FP in general, so I
> don't know if there are any theoretical reasons why something like this
> couldn't work. Obviously lazy and infinite lists add some wrinkles, but
> I think it could be worked through.
> BTW can you give some references to these known techniques?
Don't know if this is exactly what you are looking for, but I found
these articles quite interesting.
More information about the Haskell-Cafe