If your solution for a question requires, say, two functions, that should be called one after another, is it acceptable to define the two functions, with it being expected that the user will invoke the two in sequence?
That is, if you define two functions f(x)
and g(x)
, with the intention being that the user would call them as f(g(x))
, is this an acceptable solution, or does the solution need to have a h(x)=f(g(x))
definition or equivalent, so that the user would simply call h(x)
?
What is the community's position on this?