(OP updated node after my reply)
As for the Perl 5 version, try lexical variables (i.e. my) for $f, $g and $x. (outputs "test test test test" for me)
In reply to Re: Rakudo function composition problem
by almut
in thread Rakudo function composition problem
by eklerks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |