in reply to Re^3: Elegantly map fizz to buzz
in thread Elegantly map fizz to buzz
Here are the two rules which drive how the grammar distinguishes a Whatever * from a multiplication *:
For example, an operator is allowed between values, and an infix:<+> definition is in scope in ordinary code (here's the built in Numeric role's contribution to that definition), so the token + in 2 + 3 is treated as invoking infix:<+>. The same thing applies for other infix operators including multiplication with Infix:<*>.
For example, 2 + 3 includes the two values 2 and 3 and there is no prefix:<*> so one could write * + * to express "Whatever plus Whatever".
»ö« . o O ( "the celebrity tell-all of the Perl-6 cult?" )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Elegantly map fizz to buzz
by Laurent_R (Canon) on May 23, 2016 at 06:22 UTC |