1.
continue to call itself (to itself) - infinite loop maximum level of 1000, the actual test 997/998
2
.
There are definite termination condition
Meet the above two is
valid recursion.
Delivery
: execution conditions have been met until the end
Return
: From the beginning of the end of back-off condition
The maximum depth of recursion 998
•. 1 . A closure is a function in the function nested.
• 2 . Closures must be a function of the outer layer function arguments inner (non-global variable) reference.
• 3. outer function returns the inner function name
• closure action package : information is not stored locally destroyed, to ensure data security.
Applications • Closures : decorator