This is how在Clojure中编写一个monoid: (def mempty (+)) ;; 0 (def mappend +) (defn mconcat [ms] (reduce mappend mempty ms)) (mappend 3 4) ;; 7 (mconcat [2 3 ...
確定! 回上一頁