Last active
July 7, 2016 17:48
-
-
Save ztellman/c52765db0e739e8eec2b83cd68f319fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(require '[manifold.deferred :as d]) | |
(defn wrap-async-handler [f] | |
(fn [req] | |
(let [rsp (d/deferred)] | |
(f req #(d/success! rsp %) #(d/error! rsp %)) | |
rsp))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment