Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
show my &somefix:<foo> = form
  • Loading branch information
gfldex committed Jul 17, 2016
1 parent 12d28f5 commit 4897e96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/Language/functions.pod6
Expand Up @@ -489,6 +489,13 @@ sub postcircumfix:<!! !!>($left, $inside) {
say 42!! 1 !!; # 42 -> ( 1 )
=end code
Blocks can be assigned directly to operator names. Use a variable declarator and
prefix the operator name with a C<&>-sigil.
my &infix:<ieq> = -> |l { [eq] l>>.fc };
say "abc" ieq "Abc";
# OUTPUT«True␤»
=head2 Precedence
Operator precedence in Perl 6 is specified relatively to existing operators.
Expand Down

0 comments on commit 4897e96

Please sign in to comment.