
9 Mar
2010
9 Mar
'10
7:25 p.m.
In FP the variable can not be changed once created. Yes, it has much advantage . However, i feel it is too strict. As we know, the local variable is allocated on stack which is thread safe. So if the local variable can be changed, then we can use loop, etc. same as imperative languages. For example, for (i=0; i<100; i++) where `i` is a local variable in function. Any suggestion is appreciated! ----- fac n = let { f = foldr (*) 1 [1..n] } in f -- View this message in context: http://old.nabble.com/If-the-local-variable-can-be-changed-...-tp27844016p27... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.