Re:A trick to have arbitrary infix operators in Python
by joppy on Wednesday January 26, 2022 @05:42AM
(#30083894)
Another argument is in regular expressions, where you can see that concatenation distributes over alternation: A(B|C) is the same regex as AB|AC.
[ Parent
| on HN ]
Re:A trick to have arbitrary infix operators in Python
by rocqua on Friday January 28, 2022 @06:09AM
(#30113174)
Huh, neat!. Especially since alternation is commutative. So this is a ring-like structure! We have 'identity' if you allow a pattern that matches nothing. No inverse elements though. Not sure what the name of this ring-like thing is. But pretty certain it is named.