func(args) = ...
func(args) += ...
func(args) =~ s///
Such functions have been modeled in object models that accept
arg-list+operator (head+operator) polymorphic signatures. It would be
up to the programmer of func() to dictate what happens when func() is
invoked.
The following would be the pseudo-code (nothing to do with perl) that
simulates the operator as another argument.
overloadfunc...
func (operator:args){...}
func (+:args){...}
func (=:args){...}
func (+=:args){...}
func (=~:args){...}
func (args)
Which allows the following invocation:
a = func(args);
a = b + func(args);
a = func(args) + func(argt);
func(args) = a;
func(args) = func(argt) + func(argu);
However such an invocation is problematic:
func(argt) + func(argu) = anything else;
For such, I recommend that, for each LHS function create a thread. All LHS
threads would then have to cooperate to come to their individual resolution.
That would require multi-threading stability in Perl.
It is recommended to read the RFC in the perspective of object modeling in Perl.