Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jun 12, 2018
1 parent bbbce35 commit ddd101b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/Language/objects.pod6
Expand Up @@ -987,11 +987,13 @@ anonymous roles are supported.
my $i = 2 but R;
sub f(\bound){ put bound };
f($i); # OUTPUT: «hidden!␤»
my @positional := <a b> but R;
say @positional.^name; # OUTPUT: «List+{R}␤»
Note that the object got the role mixed in, not the object's class or the
container. Thus, @-sigiled containers will require binding to make the role
stick. Some operators will return a new value, which effectively strips
the mixin from the result.
stick as is shown in the example with C<@positional>. Some operators will return
a new value, which effectively strips the mixin from the result.
The operator infix:<but> is narrower than the list constructor. When providing
a list of roles to mix in, always use parentheses.
Expand Down

0 comments on commit ddd101b

Please sign in to comment.