I define a value "x" to be 2
Prelude> let x=2
Prelude> :sprint x
x = _
Prelude> show x
"2"
Prelude> :sprint x
x = _
Prelude> x
2
Prelude> :sprint x
x = _
- Does Haskell uses the concept "variable" at all? In FP like Haskell, everything is a function, but is "x" a function?
- if "let x=2" is only a name binding, without evaluation, and then "x" command shows "2", so it has been evaluated right? Why ":sprint x" still prints "_"?