We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is a suggested implementation:
(defn enrich [f] (->interceptor :id :rp-enrich :after (fn enrich-after [context] (let [event (get-coeffect context :event) get-prev #(if (contains? (get-effect context) %1) (get-effect context %1) ;; If no effect is returned, we provide the original coeffect. (get-coeffect context %1)) prev-db (get-prev :db) prev-ds (get-prev :ds) new (f {:db prev-db :ds prev-ds} event)] (-> context (assoc-effect :ds (or (:ds new) prev-ds)) (assoc-effect :db (or (:db new) prev-db)))))))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here is a suggested implementation:
The text was updated successfully, but these errors were encountered: