Are closures a violation of the functional programming paradigm?
Functional programming "avoids state and mutable data". Closures hide state by binding their lexical environment and are thus closed over their free variables . How is Haskell purely-functional if it supports closures? Don't they break referential transparency? In Haskell, closures have free variables in the same way that in math you can write f x = x^2 - it doesn't mutate state. I would say that Haskell avoids mutable state. Closures are not a violation because all bindings in Haskell are immutable. What closures really mean is that a lambda with free variables doesn't denote one unique