JuliaPluto/Pluto.jl

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

Open

#3,545 建立於 2026年5月12日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Julia (5,295 star) (329 fork)batch import
good first issue

描述

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.

貢獻者指南

`local function` works, but leads to multiple definitions error · JuliaPluto/Pluto.jl#3545 | Good First Issue