Can someone please explain the difference between closures and continuations? The corresponding articles in wikipedia do not really compare the differences between the two.
Can someone please explain the difference between closures and continuations? The corresponding articles in
Share
A closure is a function that captures data from the environment on which it was declared.
A continuation is a more abstract concept, and refers to what code should be executed afterwards. It can be implemented using a closure.