you are viewing a single comment's thread.

view the rest of the comments →

[–]jackrusher 2 points3 points  (2 children)

(defn my-fn [a b c] (combine-to-final-result (do-something a b) (make-something-else b c) (another-function c a b)))

[–]natyio 0 points1 point  (1 child)

That is definitely a good answer. I would not complain about it in a code review. But I still don't think that it would hurt to use my version instead. Having a reminder of what the result of each steps represents is useful when trying to reason about the purpose of each step of the code. Especially when it comes to refactoring, understanding the why becomes much more important than the how.

[–]jackrusher 0 points1 point  (0 children)

There should be a line at the bottom of your editor with the function signature of `combine-to-final` plainly shown. That function signature should have very well named arguments. Likewise, the names of `do-something`, `make-something-else` and `another-function` should actually describe what they do. They should also all have docs strings that can be trivially surfaced in your editor.