Browse thread
Crash reading a file
-
tmp123
- Adam Chlipala
- Chet Murthy
-
tmp123
-
Ashish Agarwal
- Loup Vaillant
-
Ashish Agarwal
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 <agarwal1975@gmail.com>: > > 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).