Whats new on the surface is slight change in syntax: the rest operator is a symbol with a name matching the regex &.*. This is to get around the limitation of duplicate map keys.
In terms of implementation, there is a new node type :merge which is created during map parsing.
This patch permits sequential patterns to use more than one rest pattern enabling the following possibilities (among many more).
Seq pattern matching
Seq pattern matching with vector pattern substitution
Map matching
Map substitution
Whats new on the surface is slight change in syntax: the rest operator is a symbol with a name matching the regex
&.*
. This is to get around the limitation of duplicate map keys.In terms of implementation, there is a new node type
:merge
which is created during map parsing.