Pluto - UndefVarError

It is even more complex:
Since one of the latest releases, Pluto automatically wraps cells into functions (see https://github.com/fonsp/Pluto.jl/pull/720) for performance reasons. Thus, the scope should in principle behave as you have expected it.
However, Pluto cannot wrap all cells into functions, excluded are e.g. cells with macros (your case - Pluto does not know which variables are modified inside macros) or inputs.
Thus, in your concrete case all_foos is not defined in the for-loop.
You can try to replace the pipe-macro, then this code should work in the latest Pluto version.

1 Like