[Haskell-cafe] Re: If the local variable can be changed ...

2010-03-14 Thread Chung-chieh Shan
zaxis z_a...@163.com wrote in article 27844016.p...@talk.nabble.com in gmane.comp.lang.haskell.cafe: As we know, the local variable is allocated on stack which is thread safe. It's not. http://en.wikipedia.org/wiki/Funarg_problem#Example -- Edit this signature at

[Haskell-cafe] Re: If the local variable can be changed ...

2010-03-10 Thread John Lato
From: zaxis z_a...@163.com So if the local variable can be changed, then we can use loop, etc. same as imperative languages. For example, for (i=0; i100; i++)  where `i` is a local variable in function. In addition to John Millikin's suggestion, you can also do: map f [0..99] where f ::

[Haskell-cafe] Re: If the local variable can be changed ...

2010-03-10 Thread Stefan Monnier
So if the local variable can be changed, then we can use loop, etc. same as imperative languages. For example, for (i=0; i100; i++) where `i` is a local variable in function. It is true that a pure language could support such things (some pure languages do, e.g. Sisal). The experience of