I was struggling to compose datomic queries neatly. In the end I googled and found a blogpost which proposed a sane solution.
My motivation was an API endpoint with optional filters. I'd like my query include additional filters based on the args present.
Anyway, here's how my code ended up looking...
And the article: http://grishaev.me/en/datomic-query