not-empty is not a predicate. see (doc empty?) which says (seq x) is preferred to (not (empty? x))
.@bbatsov @puredanger why does the Clojure style guide prefer seq to not-empty when checking for empty sequenceshttps://github.com/bbatsov/clojure-style-guide#nil-punning …
-
-
-
Ok, but seq is not a predicate either. It feels like I'm messing some subtlety (and related: what's the use-case for not-empty then? some->> threading, what else?).
-
Suppose you want to operate on a non-empty collection without forcing it to a seq: (some-> {:a 1} not-empty (assoc :b 2)) Every building block in Clojure has its place, which is awesome.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.