Changed subject line. This is far from original topic.
What's wrong with usingĀ @? If I understand correctly, it's used for matrix multiplication, which is far enough from function composition to avoid confusion. And it's slightly similar visually to a circle.
I like @. Function composition is kinda-sorta enough like for product that I can even make sense of the same operator.
But how would you go about getting a .__matmul__ attribute onto all functions.
That's easy, especially when everyone is talking about evil.
```
from forbiddenfruit import curse
def compose(self, other):
return lambda *args, **kwargs: self(other (*args, **kwargs))
for func in [compose, len]:
curse(type(func), "__matmul__", compose)
assert (len @ str)(789) == 3
```
But seriously, I don't see that much point to this idea. It's just slightly more concise while not being particularly readable or beginner friendly.
```
sorted(paths, key=lenĀ @ str)
sorted(paths, key=lambda p: len(str(p)))
```
I think the problem is just that lambda isn't the nicest syntax, and we'd like something more concise, e.g.
```
sorted(paths, key=:len(str($)))
```
which would be more generally useful. But I know this kind of thing has been discussed to death.