Skip to content

allow tuple destructuring in formal arguments #6614

Closed

Description

I've seen this a few times, maybe support could be added:

julia> map({:foo=>"foo", :bar=>"bar"}) do (k, v)
             println("$k: $v")
       end
ERROR: syntax: "(k,v)" is not a valid function argument name

Right now people fall back on:

map({:foo=>"foo", :bar=>"bar"}) do el
    (k, v) = el
    println("$k: $v")
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

compiler:loweringSyntax lowering (compiler front end, 2nd stage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions