Meaning of non-anonymous nested/local function

Consider the following function

function outer(capture)
    function foo()
        capture + 1
    end
    bar = function()
        capture + 1
    end
    baz = () -> begin
        capture + 1
    end
    ...
end

Afaik the definitions of bar and baz are completely equivalent in constructing an anonymous function. But what about foo? This syntax does create a named function. Does it make any difference to my code or the compiler which style I chose? Normally I tend to use second or third option, as it is visually different from global functions and underlines the local nature of the object.

I have used the foo form when it was convenient to have a closure with different methods for dispatch. I do sometimes fear that terrible things will happen to me for doing so though.