These exist with lambdas
function A()
let B = { -> 'thing' }
endfunction
// B does no exist
But the lambda returns a value and not a sequence of commands.
(I know I could put execute("..") in the lambda but this is an ugly hack.)
function A()
function B()
echo "I'm going to leak"
endfunction
endfunction
// B exists everywhere now
Now we can call B()
from outside A
, so it's not local to the function.
So, is it possible to have a function-local inner functions?
(I want to pass closure callbacks without redefining a script-local function every time.)