7 ms·
The variables are persisted within a closure since they are in the scope of the internal function definitions. Whether each function points to the same closure
by lukevp 6y ago
The variables are persisted within a closure since they are in the scope of the internal function definitions. Whether each function points to the same closure value as they are changed would be based on the language semantics around the creation of the closure and whether mutability of the closure variables would propagate to the other function definitions that also have a closure around that variable (if the variables are updated by reference or value).