Post

Was going to argue with you, but then I realized you're right 😂I was going to say something along the lines of "I might not be in control of those functions being called", but nothing stops you from writing a wrapper function for each step.

0 reposts2 likes

😂 Yeah, the generic `validate` helper shown here can reduce the amount of micro functions. It converts true/false into ok/error_reason. I typically also add validate/1 which produces error without reason. But if the check is more complicated/longer then I definitely move it to a separate priv fun.