Y
Hacker News
new
|
ask
|
show
|
jobs
by
distortion
6072 days ago
Of course Haskell has closures, there's always a scope to close over:
f x = (\y -> x + y)
1 comments
blasdel
6072 days ago
That's still just high-level lexical sugar - the 'scope' is not captured, just rewritten. After desugaring, there is no scope left, even lexically.
It's completely different from a 'closure' in a language that has variables.
link
It's completely different from a 'closure' in a language that has variables.