Does Haskell have variables?
问题 I've frequently heard claims that Haskell doesn't have variables; in particular, this answer claims that it doesn't, and it was upvoted at least nine times and accepted. So does it have variables or not, and why? This question also appears to apply ML, F#, OCaml, Erlang, Oz, Lava, and all SSA intermediate languages. 回答1: Haskell has immutable variables (variables in the math sense) by default: foo x y = x + y * 2 By default variables are not mutable cells . Haskell also has mutable cells