Ways of defining a function

f(x) = ...

is just shorthand for

function f(x)
    ...
end

That said, using the shorthand with a begin ... end block just defeats its purpose. Use it when your code is short (one-liners).

3 Likes