为什么不when-let和if-let默认支持多个绑定?
所以:
(when-let [a ...
b ...]
(+ a b))
Run Code Online (Sandbox Code Playgroud)
...代替:
(when-let [a ...
(when-let [b ...
(+ a b)))
Run Code Online (Sandbox Code Playgroud)
我知道我可以编写自己的宏或使用monad(如此处所述:http://inclojurewetrust.blogspot.com/2010/12/when-let-maybe.html).
clojure ×1