About 52 results
Open links in new tab
  1. function - How do JavaScript closures work? - Stack Overflow

    Sep 21, 2008 · How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand …

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

    Feb 23, 2014 · I frequently choose to use closures in the Strategy Pattern when the strategy is modified by data at run-time. In a language that allows anonymous block definition -- e.g., Ruby, C# -- …

  3. functional programming - What is a 'Closure'? - Stack Overflow

    Aug 31, 2008 · I asked a question about Currying and closures were mentioned. What is a closure? How does it relate to currying?

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

    Apr 28, 2010 · But the callback function in the setTimeout is also a closure; it might be considered "a practical use" since you could access some other local variables from the callback. When I was …

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

    Aug 20, 2009 · 3 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 …

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

    Closures are like lambda functions, but smarter in the sense that they have the ability to interact with variables from the outside environment of where the closure is defined.

  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 from within …

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

    Jan 10, 2009 · 3 Closures are chunks of code that reference a variable outside themselves, (from below them on the stack), that might be called or executed later, (like when an event or delegate is defined, …

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

    Sep 28, 2012 · I was reading about closures on the net. I was wondering if C++ has a built-in facility for closures or if there is any way we can implement closures in C++?

  10. c - Function pointers, Closures, and Lambda - Stack Overflow

    3 Closures imply some variable from the point of function definition is bound together with the function logic, like being able to declare a mini-object on the fly. One important problem with C and closures …