6 ms·
This is what they want: func outer(a int) { func inner_helper(b int) { ... } } Pascal allowed nested functions 40 years ag
by a_strange_guy 15y ago
This is what they want:
func outer(a int) {
func inner_helper(b int) {
...
}
}
Pascal allowed nested functions 40 years ago...
- Peaker 15y agoWhen saying "nested functions" in 2011, people expect you to mean lexically scoped nested functions. Pascal's nested functions really just scoped the name of the function differently, but they were equivalent to a function definition on the outer-most level.