Closed darkleaf closed 2 years ago
@darkleaf Not sure what your use case is but have you considered:
(m/find-first some? ...)
If I'm reading your test cases correctly I think the only case the above doesn't cover is:
(is (= :ok (m/?? :ok (throw (ex-info "Fail" {})))))`
@anthonygalea I want to use ??
to set up lazy defaults:
(fn [x y z]
(m/?? x (costly-get-x y z) (throw (ex-info "Can't get x" {:y y, :z z}))))
(fn [x y z]
(m/?? x (costly-get-x y z) default-value))
(m/?? (get-in x [...])
(my-func ...)
(get-in y [...])
(throw ...))
Thank you for the patch, but I think this is too specific for Medley.