In ruby? allowed at the end of the identifier, allowing things like
if do_something? do_something
which allow you to differentiate a function while keeping the bool from a function that does something.
In Haskell, it is obvious that a type signature tells you the difference between the two functions, but is there a naming convention or naming pattern for the bool name or parameters?
In my case, I want to generate (or not) some labels depending on the value of the parameters (passed as an argument).
obvious code will be
generate options = do when (generateLabels? options) generateLabels
but how to generateLabels? Invalid name, how can I call it?
source share