Can functions with non-pure arguments of type functions be pure?
Can functions that take non-pure functions as arguments be considered pure if they do not change/store state directly, don't reference global variables etc?
Where and how do we draw the line on what is pure and what is not, is it solely on the function's in question code or do we take into account the effects of invoking the arguments?
E.g. imagine this scenario, where the pure function represents a stateless workflow and takes as arguments a few actions to be executed during this workflow. One of these actions changes some state somewhere. So if I'm looking strictly at the implementation of my workflow, it seems pure, but eventually it does modify state by invoking this parameter function that modifies state.
I'm tempted to speculate the workflow is also non-pure, but passing in a different argument that does not change state will make it pure, so I'm confused.