[Describe variables. Bryan O'Sullivan **20070913060903] { hunk ./en/ch03-funcs-types.xml 379 + + + Just what is a variable, anyway? + + If you're used to imperative programming languages, you're + likely to think of a variable as a way of identifying a + box. You can get the value that's currently in + a box, and you can change the value in the box using + assignment. + + In Haskell, a variable is the name of a + value. This is critically different from + the name of a box: we're used to being able to change what's + inside a box from our dealings with other languages, but we + can't change the twoness of the value + 2. + + Creating a variable in Haskell just gives a convenient + name to a value; we can't change the value associated with a + variable. This bears a strong similarity to the way we think + about variables in mathematics. + }