除非我弄错了,看起来 & 模式和 :as 模式之间存在一些交互问题
(match (link: [:bar :baz])
(link: ([:bar & r) :as m)] m)
-> (link: :bar)
我预计在这里会有 (link: :bar :baz)
这正是我预期的
(match (link: [:bar :baz])
(link: [:bar & r)] :a)
-> :a
这也是预期之中的
(match (link: [:bar :baz])
(link: ([:bar :baz) :as m)] m)
-> (link: :bar :baz)
所以 & 和 :as 各自独立工作。