Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: John Prevost <j.prevost@g...>
Subject: Re: [Caml-list] let () =
It really means "I expect bla to have type unit, and am executing it
here for side effects."  Some people write instead:

let _ = bla

Which means "I don't care what type bla has, but am executing it for
side effects."  The let () one is somewhat safer because you are
explicitly saying you don't expect the call to return anything.  The _
one, you might leave an argument out, and it would still typecheck.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: