除非我弄错了,看起来 & 模式和 :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 各自独立工作。