Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
explain that Range operators curry WhateverCode but not Whatever
  • Loading branch information
moritz committed Aug 1, 2012
1 parent e0b2b30 commit c73b3cb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/Whatever.pod
Expand Up @@ -46,6 +46,19 @@ Not all operators and syntactic constructs curry Whatever-stars.
=end table
The range operators are handled specially. They do not curry with
C<Whatever>-stars, but they do curry with C<WhateverCode>
say (1..*).WHAT; # Range
say (1..*-1).WHAT; # WhateverCode
This allow all these constructs to work:
.say for 1..*; # infinite loop
my @a = 1..4;
say @a[1..*]; # 2 3 4
say @a[1..*-2]; # 2 3
=head1 Methods
=head2 ACCEPTS
Expand Down

0 comments on commit c73b3cb

Please sign in to comment.