Closures and state representation A closure can be used to associate a function with a set of `` private '' variables , which persist over several invocations of the function .

Closures keep the state of their bound variables over several invocations .
