Functional programming is not about ``state change''.

The operator = in Haskell implies equality not state change.

For example, this is not legal Haskell:


f x = a + b
      where
        y = x - 1
        a = y^2
        y = x + 1
        b = y^2


We are not assigning a value to y in the above Haskell function.

We are making a declarative statement that y is equal to another expression.

Index