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
Re: [Caml-list] Future of labels
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-12 (16:14)
From: Mattias Waldau <mattias.waldau@a...>
Subject: RE: [Caml-list] How do I define prog1?
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.)

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr