New release - b.47
• various improvements to docstrings - thank you @fmjrey !
• two new task operators : any and all
any and all should deprecate the "attempt-absolve sandwich" pattern, please favor these new functions and let me know if you have a use case that's not covered.
https://cljdoc.org/d/missionary/missionary/b.47/api/missionary.core#any
https://cljdoc.org/d/missionary/missionary/b.47/api/missionary.core#all
Is there a typo in the example of all?
(fn [f g] (f)) should be (fn [f g] f) since the params are the results of each tasks
Or I miss something?
(require '[missionary.core :as m])
((m/all (fn [f g] (f))
(m/sp (m/? (m/sleep 2000)) :foo)
(m/sp (m/? (m/sleep 1000))
(throw (ex-info "Error." {}))))
prn (fn [_] (prn :failure)))
;; 2 seconds
:foono, results are wrapped in a function so you can discriminate between success and failure
Oh! sorry! Ok.