Ordering is only irrelevant when the functions you want to re-order are independent. If the input of one function depends on the output of another, then they can’t be re-ordered.

If the functions operate independently and cause no side effects (so you know they are not dependent on some implicit ordering such as one function writes to a file and the other reads from it), then they can be re-ordered at will.

Head of UX Engineering at GOJEK