when-let

宏

(when-let binding)

(when-let [name expr] & body) — evaluates expr once; when the

value is non-nil, binds it to name and evaluates body, returning

the last body value; nil otherwise. The binding must be a

two-element vector; the name slot accepts a destructuring

pattern. Unlike Clojure, a false value is non-nil here and so

binds (zio's boundary: the check is nil, not truthiness).