Hacker News new | ask | show | jobs
by whalesalad 3369 days ago
Have you looked into the `some->` threading macro? https://clojure.github.io/clojure/clojure.core-api.html#cloj...
1 comments

Yes, it gives you short circuiting on nil values. The post mentions `some->` and laments its inability to handle varying function signatures.

You can combine `some->` with other threading macros to make it achieve the desired effect, and you can also achieve the desired effect with `if-let` as the post demonstrates, but I believe the b/cond approach to be more readable than both.