Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is indeed assignment: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...

shadowing would be a second 'let a = 2'



Yeah, my bad but the code from grandparent is also incorrect, as for it to be compilable variable must be declared as mutable.

That confused me, as I assumed that code there is compiling. But the only way for it compile is shadowing, so yeah, I kind of assumed that to shadow is to use this syntax. I'm not working with F# for some time, so should've checked before posting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: