Not.
In Swift, function declarations are just shortcuts to what you did with this closure + variable. That is, function names are essentially constants and should always be treated as such (you can even pass a function name without parentheses as a reference).
What you are doing is reusing the name f to close the variable. Swift seems to have a compiler problem that doesn't complain about it. However, this problem will never occur in good code, so this is not a real problem.
This can be a bit confusing.
source share