Skip to content

Instantly share code, notes, and snippets.

Created June 17, 2013 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/17fbd409820a3da23724 to your computer and use it in GitHub Desktop.
Save anonymous/17fbd409820a3da23724 to your computer and use it in GitHub Desktop.
# dotted postfix
{
my (@r, @e);
(@r = (1, 4, 9))»++;
@e = (2, 5, 10);
is(~@r, ~@e, "operator call on integer list elements");
(@r = (1, 4, 9)).»++;
is(~@r, ~@e, "operator call on integer list elements (Same thing, dot form)");
#?rakudo skip 'hyper dot postfix form does not work currently'
{
(@r = (1, 4, 9))».++;
@e = (2, 5, 10);
is(~@r, ~@e, "operator call on integer list elements (Same thing, dot form)");
};
#?rakudo skip 'hyper dot postfix form does not work currently'
{
(@r = (1, 4, 9)).».++;
is(~@r, ~@e, "operator call on integer list elements (Same thing, dot form)");
};
#?rakudo skip 'hyper dot postfix form does not work currently'
{
(@r = (1, 4, 9))\ .»\ .++;
@e = (2, 5, 10);
is(~@r, ~@e, "operator call on integer list elements (Same thing, upspace form)");
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment