Tiimmy:
Best I know, f@g applies g first in every language that implements a
composition operator, and in mathematics. While that may be arbitrary,
it's easy to remember:  (f@g)(x)  "looks a heck of a lot more like"
f(g(x)) than g(f(x))
 
On Sun, May 24, 2020 at 5:39 PM Guido van Rossum <guido@python.org> wrote:
Dang, you're right. It works as you'd expect without overthinking it. :-)
 
I think one thing that pulls in different directions is that both composition and piping are useful, and do something closely related.  But in one the data "goes" forward and in the other the data "goes backward."

I use bash a lot, and writing something like this is common:

cat data | sort | cut -d; -f6 | grep ^foo | sort -r | uniq -c

My data is moving left to right through the operations.  In contrast, I might write in some hypothetical programming language:

myfilter = uniq[count] ∘ sort[reverse] ∘ grep[^foo] ∘ cut[;,f6] ∘ sort
result = myfilter(data)

(In my just-now-invented PL, the square brackets are some kind of partial application operators)

Here my data is moving right to left within the composition.  Haskell spells pipes approximately `>>`, F# as `|>`, R as `%>%`, and so on.  But some of the same languages also have composition (point-free style) that reverses the order of operations (using different symbols).

--
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.