Closures (Slideshow)

History

  • Wikipedia

  • “A record storing a function together with an environment”

    • That is pretty much it!

  • Dates back to early functional languages

    • LISP

    • Scheme

Today

  • Also available in modern languages

    • Javascript

    • C++: explicit capturing in lambdas

    • C#

  • Definitely not unique to Python

    • Although Wikipedia start out with Python examples