From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA12256; Fri, 6 Jun 2003 21:13:57 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA12586 for ; Fri, 6 Jun 2003 21:13:56 +0200 (MET DST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h56JDtH03061 for ; Fri, 6 Jun 2003 21:13:56 +0200 (MET DST) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19OMbl-0004rm-00 for ; Fri, 06 Jun 2003 21:10:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19OMbA-0004p2-00 for ; Fri, 06 Jun 2003 21:10:00 +0200 From: Alan Post Subject: [Caml-list] Re: Why do input* and readdir throw End_of_file ... annoying! Date: Fri, 6 Jun 2003 19:09:59 +0000 (UTC) Message-ID: References: <32CAF7EC-9849-11D7-BAD2-000393863F70@exomi.com> <20030606185111.GA3545@redhat.com> X-Complaints-To: usenet@main.gmane.org User-Agent: slrn/0.9.7.4 (NetBSD) X-Spam: no; 0.00; readdir:01 recursion:01 beginners:01 extlib:01 enum:01 ocaml:01 06,:02 wrote:03 annoying:03 tail:03 redhat:05 tutorial:05 brian:06 fri:07 problem:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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