JuliaPluto/Pluto.jl

`local function` works, but leads to multiple definitions error

Open

Aperta il 12 mag 2026

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Julia (5295 star) (329 fork)batch import
good first issue

Descrizione

A cell in pluto:

begin
    local function f(x)
        x^3
    end
    f(2)
end

This runs as expected and f is not available outside the begin-block, but if another cell also defines local function f(), I still get a Multiple definitions for f error.

Guida contributor