bindings => binding-form test When test is not nil, evaluates body with binding-form bound to the value of test
user=> (when-some [x 1] [x :ok]) [1 :ok] user=> (when-some [x nil] [x :ok]) nil
user=> (when-some [x "Hello"] (println x)) "Hello" nil user=> (when-some [x nil] (println x)) nil
;; In contrast with when-let, when-some evaluates the body for false values: (when-some [x false] {:x x}) ; => {:x false} ;; While when-let suppresses evaluation for false values: (when-let [x false] {:x x}) ; => nil
bindings => binding-form test If test is not nil, evaluates then with binding-form bound to the ...
bindings => binding-form test When test is true, evaluates body with binding-form bound to the va...
Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is...
binding => binding-form init-expr binding-form => name, or destructuring-form destructuring-form...
Evaluates test. If logical true, evaluates body in an implicit do.
when-some