Ideally, Prolog predicates can be used in all directions. For many pure predicates, this is also actually the case. However, some predicates only work in particular modes, which means instantiation patterns of their arguments.
By convention, the most common argument order for such predicates is:
p(..., State0, State, ...)