Return is used with two arguments and there are no enclosing functions:
This shows a typical use of Return with two arguments. The second argument is used here to specify that the return should be from the enclosing Module:
Without the second argument in Return, the default is to return from the enclosing Do loop, so the return value of the function will be different:
This shows an incorrect use of the second argument in Return. The function f does not enclose the Return expression and so cannot be used as a return destination.
Clear the definition of f: