除非我弄错了,似乎 & 模式和 :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 分别独立工作。