Re: why is 4 the outcome ?

"Lukasz Stafiniak [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <CAJMfKEV0Ns_cr5H1bJBHnv0_JyJ8fQD3um2dYsYU-XLNMuF5jQ@mail.gmail.com>
On Wed, Oct 15, 2014 at 2:26 PM, Roelof Wobben [email protected]
[ocaml_beginners] <[email protected]> wrote:

>
>
> oke,
>
> I thought I had to read it as follows
>
> let x = 1  the first x in x + x  is a 1
> let x = 2  so the second x in x + x is a 2 so it will be 1 + 2  = 3
>
> Roelof
>
>
It is possible to have that effect :-)

let x = 1 in x + (let x = 2 in x)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.