On Tue Sep 03 17:37:18 2013, timk wrote: > > > <TimK1> rn: sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> > > $n }; say 1 .. 3 add 5; > > <camelia> niecza v24-92-g3961d5d: OUTPUT«6 7 8» > > <camelia> ..rakudo 484f08: OUTPUT«[31m===[0mSORRY![31m===[0m Error > > while compiling /tmp/J6R82sHIP7Routine given to equiv does not appear > > to be an operatorat /tmp/J6R82sHIP7:1------> » > > <TimK1> rn: sub infix:<add> (@a, $n) is equiv(&infix:<+>) { @a <<+>> > > $n }; say (1 .. 3) add 5; # definitely not what I wanted > > <camelia> rakudo 484f08, niecza v24-92-g3961d5d: OUTPUT«6 7 8»
Hi, currently both commands give the same result: $ perl6 -e 'sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> $n }; say 1 .. 3 add 5;' 6 7 8 $ perl6-m -e 'sub infix:<add> (@a, $n) is equiv(&infix:<X>) { @a <<+>> $n }; say (1 .. 3) add 5;' 6 7 8 What result did you expect? (esp. I don't understand your comment '# definitely not what I wanted' after the second command.) Christian