At one point in every persons life they’ve asked themselves the question.. What’s the difference between a lambda and a closure! Okay I admit maybe not everyone asks this questions but certainly I did a few days back. I was working on a project that kept referring to the use of closures and to me they looked a lot like lambda functions. I did a little googling and stumbled across this blog post.
The blog post went into depth about what a lambda is and what a closure is and the difference. Come to find out, they are extremely similar hence why I thought all those Closures looked like a lambda.
The main difference between the two is the fact that Closures can access variables outside of the scope that it was created which becomes incredibly powerful in certain circumstances.