when-seq and if-seq as short-hand macros
Add when-seq and if-seq as short-hands for (when-let [x (seq ...)]) and (if-let [x (seq ...)]).
What problem does this solve? It's just a convenience for dealing with functions that either return nil or empty collections.
There are 100-200 instances each of these idiom that can be found on github. I'm not aware of this being implemented or widely used in common utility libraries.
The reason I needed this was when I created a function that returned a seq, but I also wanted it to be used as a predicate without the user needing to call seq on it in a when-let. If the above macro existed in core I could just recommend to use that and not worry about my return value.
I'm finding about 1700 occurrences in my local .m2 using this script (probably lots of duplicates due to multiple versions of the same lib):
Just make it executable and run from a directory. The script will scan the dir recursively for sources/jars.