Skip to content

Instantly share code, notes, and snippets.

@mping-exo
Created June 26, 2020 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mping-exo/7da442e76f6302a1422729ee52487ef4 to your computer and use it in GitHub Desktop.
Save mping-exo/7da442e76f6302a1422729ee52487ef4 to your computer and use it in GitHub Desktop.
ablauf deferred
(d/on-realized (d/chain (d/success-deferred 1)
#(println "ok" %))
(fn ok [v] (println "Realized" v))
(fn fail [e] (println "fail " e)))
;; ok 1
;; realized nil
(d/on-realized (d/chain (d/error-deferred 1)
#(println "ok" %))
(fn ok [v] (println "Realized" v))
(fn fail [e] (println "fail " e)))
;; fail 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment