I believe there’s rarely a reason to write a function that doesn’t fit in one screen (with a very large font that is!). Also, there’s no reason to have lots of anonymous functions in let blocks - just define them as a normal defns (same applies to almost any anonymous fn that is longer than one line). If you have more than 2-3 levels of nesting - split it in several functions. Ideally, all your fns should look like (->> val (foo …) (bar …) (baz …)), maybe with a let around it - so (almost) no nesting, everything is as flat and linear as possible.

Ya, after looking at the github link instead, where whitespace is much more compact. I think in your case its probably fine. A big nested query, you might not need to share the sub-parts of it.

Moving it into sub-functions could maybe allow testing the sub-queries, but it might be overkill, better spend your time testing other things.

I’d say, if the nesting was so deep, that my screen needs to scroll horizontally to see it all, I would personally break them apart just so to avoid having to scroll that way. But, if you don’t mind that, its not that there’s much wrong with it, except, at quick glance, its a bit hilarious looking.