Re: [Ocaml-lib-devel] linked list?

What would be good would be to have some sort of Obj hack so we could
build lists safely, in forward order, without needing to reverse the
list at the end.
Something like ...
let list = SLink.create () in (* list has an abstract type, but is
really a pair of pointers to front and
back of the list *)
SLink.add list element1; (* does some Obj magic to append to list *)
SLink.add list element2;
let final_list = SLink.freeze list
(Yeah, I know people are going to hate this, but has lots of practical
value).
Rich.
--
Richard Jones. http://www.annexia.org/http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
'There is a joke about American engineers and French engineers. The
American team brings a prototype to the French team. The French team's
response is: "Well, it works fine in practice; but how will it hold up
in theory?"'