English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Why do input* and readdir throw End_of_file ... annoying!
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-06-06 (19:13)
From: Alan Post <apost@r...>
Subject: [Caml-list] Re: Why do input* and readdir throw End_of_file ... annoying!
In article <20030606185111.GA3545@redhat.com>, Richard Jones wrote:
> On Fri, Jun 06, 2003 at 01:49:55PM -0500, Brian Hurt wrote:
>> The problem with try/with is that it's way to easy to break tail recursion 
>> using try/with.  About every other week someone comes to the Ocaml 
>> beginners list where they are doing something like:
> What's a good way to read all the lines of a file into a list? I
> can put it into the OCaml tutorial I'm writing.

Use ExtLib, of course.  :)

List.of_enum (input_enum chan)

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners