3
寫一個函數,它允許你創建的功能成分。 參數列表應具有可變數量的函數,並創建一個函數,從右到左應用它們。
(fn [& fs]
(fn [& args]
(->> (reverse fs)
(reduce #(apply %2 %1) args))))
http://www.4clojure.com/problem/58
=> (= [3 2 1] ((_ rest reverse) [1 2 3 4]))
clojure.lang.ArityException: Wrong number of args (4) passed to: core$rest
是什麼造成這個錯誤?我看不到它。