I have googled for any indication that AS 3 supports this but
couldn't find an answer.
At the end of this post is an example in Common Lisp that
illustrates the benefit.
In the example, every time you call the function DO-COUNT, it
returns the incremented value for the variable COUNTER, but the
variable is not accessible outside of the functions DO-COUNT and
GET-CURRENT-COUNT (the 2 functions in the lexical scope of
COUNTER), thus enabling safe access to state.