
24 Feb
2013
24 Feb
'13
5:41 a.m.
Hi, 1 main = do 2 line <- getLine 3 putStrLn line 4 line <- getLine 5 putStrLn line Here I have 'line' first bounded with a value at line 2, and then at line 4. It looks like I can set (or bind) a variable in 'do' block more than once, and it looks like it's a destructive update. But as I'm thinking about this more and more, it appears that the first and second 'line' are just an ordinary immutable variables. Line 4 just hides the 'line' from line 2 (outer lambda). Am I right? Emanuel