|
|
>> Are you
>> basically saying that variables are write-once in Haskell?
>
> AFAIK, yes, since they're defined as immutable.
>
> In other words, Haskell doesn't have variables, only constants.
Well, depending on how you define "variable" and "constant".
Take this for example: double x = 2*x
Every time you call this function, "x" can have a different value. It is
a "variable". However, DURING EACH INVOCATION, "x" can only have one
value. It is a "constant".
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|