In fact, the compiler does automatically recognize a closed function definition.
The usefulness of the #{ }
notation is: if you want to be sure a function is closed (and that future modifications don’t accidentally open its scope), add the # before it. Then any future alterations that refer to external variables will cause a compiler error, and you know that a mistake has been made.
hjh