Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] let () =
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yann Regis-Gianas <Yann.Regis-Gianas@i...>
Subject: Re: [Caml-list] let () =
Le mardi 3 Août 2004 16:46, Paul Argentoff a écrit :
> Hello World!
>
> Can anyone answer my silly question: what does "let () = bla" really mean?

from http://caml.inria.fr/ocaml/htmlman/manual015.html#s:localdef :
let pattern1 =  expr1 and ... and  patternn =  exprn in  expr 

from http://caml.inria.fr/ocaml/htmlman/manual014.html :
pattern ::= value-name | ...

and given that '()' is the unique value of type unit, 'let () = bla' means "do 
a must-succeed-match between the expression bla and ()'. Thus, this also 
means "do nothing but evaluate (reduce) bla'.

Regards,

--
Y.

-------------------
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