Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.)

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