In functional programming , the program written in programming language will always produce output exactly similar to its equivalent mathematical function.

For example , let us consider one simple mathematical function.

In this function — f ( x ) = x + 2 for a given value of x , the output will be the same.

If x = 4 then the output will be f ( 4 ) = 4 + 2 = 6.

If x = 5 then the output will be f ( 5 ) = 5 + 2 = 7.

The immutability is one of the most important feature of the functional programming.

For example if you create a variable :

Var a = 100 ; The variable value will remain same for the life span of the variable.

Var b = a + 10 ; Even here the value of a remains the same.