Skip to content

Commit

Permalink
Merge pull request #2853 from lukasvalle/master
Browse files Browse the repository at this point in the history
Examples for 6.d checklist
  • Loading branch information
JJ committed Jun 13, 2019
2 parents fbf05c3 + 988a9df commit 8a17d5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions doc/Language/operators.pod6
Expand Up @@ -273,8 +273,9 @@ X<|R,reverse metaoperator>
Any infix operator may be called with its two arguments reversed by
prefixing with C<R>. Associativity of operands is reversed as well.
say 4 R/ 12; # OUTPUT: «3␤»
say [R/] 2, 4, 16; # OUTPUT: «2␤»
say 4 R/ 12; # OUTPUT: «3␤»
say [R/] 2, 4, 16; # OUTPUT: «2␤»
say [RZ~] <1 2 3>,<4 5 6> # OUTPUT: «(41 52 63)␤»
X<|»=«>
X<|«=»>
Expand Down
5 changes: 4 additions & 1 deletion doc/Language/phasers.pod6
Expand Up @@ -396,20 +396,23 @@ Runs when an exception is raised by the current block, before the LEAVE phase.
=head2 X<CONTROL|Phasers, CONTROL>
Runs when a control exception is raised by the current block, before the LEAVE
phase. It is raised by C<return>, C<fail>, C<redo>, C<next>, C<last>, C<emit>,
phase. It is raised by C<return>, C<fail>, C<redo>, C<next>, C<last>, C<done>, C<emit>,
C<take>, C<warn>, C<proceed> and C<succeed>.
say elems gather {
CONTROL {
when CX::Warn { say "WARNING!!! $_"; .resume }
when CX::Take { say "Don't take my stuff"; .resume }
when CX::Done { say "Done"; .resume }
}
warn 'people take stuff here';
take 'keys';
done;
}
# OUTPUT:
# WARNING!!! people take stuff here
# Don't take my stuff
# Done
# 0
Expand Down

0 comments on commit 8a17d5d

Please sign in to comment.