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 SAA11917; Thu, 12 Apr 2001 18:14:20 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA11856 for ; Thu, 12 Apr 2001 18:14:19 +0200 (MET DST) Received: from tor.abc.se (ns.abc.se [195.17.72.11]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f3CGEJT26140 for ; Thu, 12 Apr 2001 18:14:19 +0200 (MET DST) Received: from gateway (dialup-53 [195.17.73.53]) by tor.abc.se (8.9.3+Sun/8.9.3) with SMTP id SAA04286 for ; Thu, 12 Apr 2001 18:14:14 +0200 (MET DST) From: "Mattias Waldau" To: Subject: RE: [Caml-list] How do I define prog1? Date: Thu, 12 Apr 2001 18:14:02 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20010412171554.A26953@lambda.u-strasbg.fr> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I got a number of solutions, no good one yet. (prog1 x1 x2 ...xn) is a construct in Lisp which evaluates x1..xn and returns the result of x1. This construct is very useful if you would like to return the value of x1, but before returning you would like to logg the result or similar. It is only useful if the language has mutable data structures or I/O (:-), which Ocaml has. (And that pragmatic attitude is the reason I like Ocaml. I want one language to handle every type of problem reasonable, since today learning the libraries take so much time.) /mattias ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr