some->>

added
1.5

ns
clojure.core

type
macro

(some->> expr & forms)

When expr is not nil, threads it into the first form (via ->>),
and when that result is not nil, through the next etc

                ;; an example of looking up a value from a
;; map and performing an operation(addition)
;; on it if it exists
user=> (some->> {:y 3 :x 5}
                 (:y)
                 (- 2))

-1


;; if we were to look up a value which
;; doesn't exist, it will safely short-circuit
user=> (some->> {:y 3 :x 5}
                (:z)
                (- 2))

nil