以下函数无法编译。如果我把这一行
(link: :context _ _) formula
改为
(link: :context _) formula
它就可以工作了。
(defn terms (link: formula)
(match formula
(link: :root r) (recur r)
(link: :expr e) (recur e)
(link: :call f [:args & args]] (for [arg args) (terms arg))
(link: :refer _ _) formula
(link: :float _) formula
(link: :context _ _) formula
(link: :string _) formula
(link: :eq e1 _ e2) (concat (terms e1) (terms e2))
(link: :add & args ) (for (link: arg args) (terms arg))
(link: :sub & args ) (for (link: arg args) (terms arg))
(link: :div & args ) (for (link: arg args) (terms arg))
(link: :mul & args ) (for (link: arg args) (terms arg))
))