Use `some->` when a pipeline may produce `nil` before reaching a function that cannot accept it. Like `->`, it passes each result as the second argument of the next form. Unlike `->`, it stops and returns `nil` as soon as a result is `nil`. section 2.3.4
The contract is compact:
- The initial expression is required; subsequent forms are optional. A bare form is wrapped as a call, and each form must begin with something callable. section 2.3.4
- If the pipeline completes, its result is the last form’s result. For last-argument threading with the same nil stop, use `some->>`. section 2.3.4
Stop before a call that would fail
`(-> {:a 1 :b 2} :c inc)` throws `NullPointerException`: the absent key yields `nil`, which reaches `inc`. `(some-> {:a 1 :b 2} :c inc)` returns `nil` instead. section 2.3.4
Guard an environment lookup
`(or (some-> (System/getenv "PORT") Integer.) 4444)` converts a present `PORT` value and uses `4444` when the lookup yields `nil`. The fallback comes from `or`, not from `some->`. section 2.3.4
`some->` is not a configurable defaulting function: its nil result is fixed. If a nil argument should be replaced before a function runs, `fnil` provides that different behavior. section 2.2.1
