DAG-Runner是一个自动化将相互关联的函数串联在一起的包,有了它大家就可以专心写Clojure函数,把结果串起来或者散开的工作就由DAG- runner自动完成啦,做复杂的数字运算特别好用
示例代码:
(defn funA [{:keys [x y]}] {:z (+ x y) :w (- x y)}) (defn funB "this function would take :w of the output from funA." [{:keys [w a]}] {:b (* w a)}) (defn funC "this function would take :z from funA and :b from funB and the output :u :v are the ultimate output that we care about." [{:keys [b z]}] {:u (* b z) :v (- b z)} )