Why don\'t when-let and if-let support multiple bindings by default?
So:
(when-let [a ...
b ...]
(+ a b))
If you use cats, then there is a mlet function that you might find useful :
(use 'cats.builtin) (require '[cats.core :as m]) (require '[cats.monad.maybe :as maybe]) (m/mlet [x (maybe/just 42) y nil] (m/return (+ x y))) ;; => nilAs you can see, the mlet short-circuits when encountering a nil value.
(from section 6.5.1 nil)