Function defs should allow patterns in arguments
Bug #439164 reported by
Matt Giuca
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Triaged
|
Low
|
Matt Giuca |
Bug Description
A function definition should allow an argument to be named "_" (currently a syntax error), which indicates that the argument is unused (it is not bound to any variable name). Multiple arguments should be allowed to be called "_". This is consistent with switch notation in Mars, as well as other languages like Haskell and Prolog.
Changed in mars: | |
milestone: | none → 0.3 |
Changed in mars: | |
milestone: | 1.0 → 1.1 |
To post a comment you must log in.
Solve this by implementing full pattern bindings in arguments, as for assignments (see bug #513633). Don't go so far as having multiple clauses.