Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Crash reading a file
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Loup Vaillant <loup.vaillant@g...>
Subject: Re: [Caml-list] Crash reading a file
2008/2/4, Ashish Agarwal <>:
> > but then I must append at the end of a list, that is something time
> consuming. I do not known about more options.
> Append to the beginning of the list during the recursion, producing the list
> in reverse. Then do a List.rev at the end.

If you don't need persistence, you can also use a stream. That way,
the stream will be consumed only as needed, and you'll have a constant
space usage, (both heap and stack).