About 247,000 results
Open links in new tab
  1. functional programming - What is a 'Closure'? - Stack Overflow

    Aug 31, 2008 · Closures Whenever we have a function defined inside another function, the inner function has access to the variables declared in the outer function. Closures are best …

  2. Can you explain closures (as they relate to Python)?

    Feb 23, 2014 · Closures are a common implementation mechanism for that sort of "function factory". I frequently choose to use closures in the Strategy Pattern when the strategy is …

  3. oop - Closures: why are they so useful? - Stack Overflow

    Aug 20, 2009 · Closures fit pretty well into an OO world. As an example, consider C# 3.0: It has closures and many other functional aspects, but is still a very object-oriented language. In my …

  4. function - How do JavaScript closures work? - Stack Overflow

    Sep 21, 2008 · CLOSURES: The closures are the smaller functions that are inside the big sing() function. The little factories inside the big factory. The little factories inside the big factory. …

  5. What is a practical use for a closure in JavaScript?

    Apr 28, 2010 · Reference: Practical usage of closures. In practice, closures may create elegant designs, allowing customization of various calculations, deferred calls, callbacks, creating …

  6. What is the difference between a 'closure' and a 'lambda'?

    Lambdas and closures are each a subset of all functions, but there is only an intersection between lambdas and closures, where the non-intersecting part of closures would be named functions …

  7. What are 'closures' in C#? - Stack Overflow

    A closure in C# takes the form of an in-line delegate/anonymous method.A closure is attached to its parent method meaning that variables defined in parent's method body can be referenced …

  8. Why aren't python nested functions called closures?

    Oct 26, 2010 · Closures are functions that inherit variables from their enclosing environment. When you pass a function callback as an argument to another function that will do I/O, this …

  9. Do we have closures in C++? - Stack Overflow

    Sep 28, 2012 · Apparently lots of people still mix anonymous functions with closures. It is still not clear for me if C++11 indeed supports closures, or just anonymous functions ("lambdas"). I …

  10. What are 'closures' in .NET? - Stack Overflow

    Jan 9, 2009 · Closures can be used for a lot of useful things, like delayed execution or to simplify interfaces - LINQ is mainly built using closures. The most immediate way it comes in handy for …