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
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.