using FastClosures
outer = [[1]]
@closure map(outer) do inner
map(inner) do x
x + 1
end
end
UndefVarError: x not defined
The reason is, that @closure thinks x is a variable from outer scope:
quote
let x = x
map(outer) do inner
map(inner) do x
x + 1
end
end
end
end