我有一个定义如下的函数:
(defn delete-rule [rules rule]
(om/transact! rules
(fn [rules] (into [] (remove #(= rule %) rules)))))
这里into
的目的是什么?
这不会产生与上面结果完全相同的结果:
(defn delete-rule [rules rule]
(om/transact! rules
(fn [rules] (remove #(= rule %) rules))))