In English, we read and write from left to right, but for some reason we apply functions in the opposite order. Consider the following procedure:
Take an element $x$, apply a function $f$ to it and then apply a function $g$ to the result.
The formula we would write for this is $g(f(x))$, which is in some sense the wrong way around, it would be more consistent to write $((x)f)g$. (I have to admit that I had some trouble formatting that, but that's presumably because I'm used to do it the other way around.) This would not only be consistent with the way we write, but also with the notation using arrows, i.e. \begin{equation} X \overset{f}{\rightarrow} Y \overset{g}{\rightarrow} Z \end{equation}
What is the reason for this apparent inconsistency?
I could imagine the reason to be either historical or logical, or both, and I would be interested in either explanation.
I wasn't sure how to tag this, so feel fry to add any appropriate tags.