Everything About ___
Live briefing

Everything about Closure (computer programming)

Technique for creating lexically scoped first class functions

In programming languages, a closure, also lexical closure or function closure, is a technique for implementing lexically scoped name binding in a language with first-class functions. Operationally, a closure is a record storing a function together with an environment. The environment is a mapping associating each free variable of the function with the value or reference to which the name was bound when the closure was created. Unlike a plain function, a closure allows the function to access those captured variables through the closure's copies of their values or references, even when the function is invoked outside their scope. Wikipedia →

đź§­ Start here: a 6-step reading path

  1. Read the overview: Closure (computer programming)A 5-minute orientation
  2. Pick up a classic book: ClosureThe most-reprinted book on the subject
  3. Read the landmark paper: Closure to “Computer Programming for Flow over Side Weirs”Cited 4 times
  4. Go sideways: Examples of anonymous functionsA closely related topic
  5. Go sideways: First-class functionA closely related topic

đź“– Definitions

No dictionary entry for this exact phrase.

🏆 Landmark papers (most cited)

📚 Books worth reading

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

đź”— Related topics