This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Rather then relying on macros, I propose to have `merge-fx` helper exposed as function | |
;; taking variable number of arguments (where the first one is always cofx, second one could | |
;; be initial effects map and then variable number of effects producing functions, with the | |
;; all of them with the same form as now: | |
(defn effects-fn [arg1 arg2 {:keys [db] :as cofx}] | |
{:db (update db :some-key arg1) | |
:http-call ...}) | |
(defn final-effects-fn [cofx] | |
(merge-fx cofx |