Skip to content

Nested do blocks do not work #20

@jw3126

Description

@jw3126
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions