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: Keith Wansbrough <Keith.Wansbrough@c...>
Subject: Re: [Caml-list] let () =
> Here are the different forms :
> 
> bla; (* warning if partial application or if returned type not unit *)
> ignore(bla); (* warning if partial application, ignore returned type *)
> let () = bla (* error if partial application or if returned type not unit *)
> let _ = bla (* no warning or errors !! be careful if you want to use it *)

let (_:bool) = bla (* error if partial application or if returned type not bool *)

is also very handy.

--KW 8-)
-- 
Keith Wansbrough <kw217@cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.

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