Look at all the variables in this function that are referenced by nested functions, and determine if a closure needs to be created for them.
See Implementation
Look at all the variables in this function that are referenced by nested functions, and determine if a closure needs to be created for them.