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
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 ::
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