I earn my paycheck in Clojure and have for about 10 years. In my experience if your code ends with ))))))))))) you're doing it wrong. This is a code smell for me.
Instead of (qux (baz (bar (foo x)))) use other tools:
- Big picture: is this code overly procedural? If so, is it possible to make it declarative and functional?
- Line-level picture: one of the thread macros, functional composition, etc. will make this more readable. For example: (-> x foo bar baz qux).
Comments
I earn my paycheck in Clojure and have for about 10 years. In my experience if your code ends with ))))))))))) you're doing it wrong. This is a code smell for me.
Instead of (qux (baz (bar (foo x)))) use other tools:
- Big picture: is this code overly procedural? If so, is it possible to make it declarative and functional?
- Line-level picture: one of the thread macros, functional composition, etc. will make this more readable. For example: (-> x foo bar baz qux).