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 EAA26362; Tue, 4 Sep 2001 04:43:52 +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 EAA26142 for ; Tue, 4 Sep 2001 04:43:51 +0200 (MET DST) Received: from str12.sobor.org (adsl-63-198-183-99.dsl.snfc21.pacbell.net [63.198.183.99]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f842ho115380 for ; Tue, 4 Sep 2001 04:43:50 +0200 (MET DST) Received: from quasar.ipa.nw.ru (anza.sobor.org [192.168.123.51]) by str12.sobor.org (Postfix) with ESMTP id BBC81AA9FF; Mon, 3 Sep 2001 19:30:31 -0700 (PDT) Message-ID: <3B943F32.2B56E73A@quasar.ipa.nw.ru> Date: Mon, 03 Sep 2001 19:40:50 -0700 From: "Alexander V. Voinov" Organization: Fear of the Lord is the beginning of wisdom X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Michael Leary Cc: Markus Mottl , caml Subject: Re: [Caml-list] flushing stdout with flush stdout not good? References: <20010903122740.A11704@ip178.usw22.rb1.bel.nwlink.com> <20010903220208.C8034@chopin.ai.univie.ac.at> <20010903185913.A12213@ip178.usw22.rb1.bel.nwlink.com> <20010903193104.A12284@ip178.usw22.rb1.bel.nwlink.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi All, Michael Leary wrote: > let fso = flush stdout > let name s = printf "Name %s\n" s; fso > let color c = printf "Colour %s\n" c; fso A question to All concerned, especially to the language creators. As I understood the notion of 'eagerness', the first line should evaluate immediately (, flush stdout) and return () (or whatever does 'flush' return). In the subsequent functions this value would be reevaluated to itself, returned and discarded. No more flushes to stdout should appear at these. Right? Is there just a misprint, so that the correct definition should read: let fso () = flush stdout? Alexander ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr