A Variable is a named memory location used to store a value. Variables and function names must always start with lower case letter.
p = 100000
t = 1.10
r = 5
interest = p * t * r *0.01
In above program, I defined four variables p, t, r and interest. All these variables store a number.
Prelude> :load interest.hs
[1 of 1] Compiling Main ( interest.hs, interpreted )
Ok, modules loaded: Main.
Variables in Haskell are immutable, that means you can’t change the value of a variable after its definition.
var1 = 10
var1 = 13.24