logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Dllist: msg#00019

Subject: Re: Dllist
On Fri, 2005-05-27 at 16:23 +0200, Christophe TROESTLER wrote:
> On Fri, 27 May 2005, John Skaller wrote:

> Can you explain a bit more your point?  

In C notation slists are made of 

struct slist { T data; slist *next; };

and dlists are made of

struct  { T data; dlist * next; dlist *prev; };

neither can represent an empty list in Ocaml.

The library supplies the maximally efficient
and simplest representation by Occam's Razor,
and that cannot be empty. It isn't a bug, but
a consequence of the mathematics.

Really, what is represented is a doubly linked
list node (not a doubly linked list).

-- 
John Skaller, skaller at users.sf.net
PO Box 401 Glebe, NSW 2037, Australia Ph:61-2-96600850 
Download Felix here: http://felix.sf.net



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005


<Prev in Thread] Current Thread [Next in Thread>