Author: finanalyst Date: 2009-09-13 21:29:01 +0200 (Sun, 13 Sep 2009) New Revision: 28235
Modified: docs/Perl6/Spec/S03-operators.pod Log: clarifying ^4 in a range and including a fractional example Modified: docs/Perl6/Spec/S03-operators.pod =================================================================== --- docs/Perl6/Spec/S03-operators.pod 2009-09-13 18:59:17 UTC (rev 28234) +++ docs/Perl6/Spec/S03-operators.pod 2009-09-13 19:29:01 UTC (rev 28235) @@ -1,4 +1,4 @@ - + =encoding utf8 =head1 TITLE @@ -3014,10 +3014,14 @@ =item * The unary C<^> operator generates a range from C<0> up to -its argument, exclusively. So C<^4> is short for C<0..^4>. +(but not including) its argument. So C<^4> is short for C<0..^4>. for ^4 { say $_ } # 0, 1, 2, 3 +or with :by + + for ^4 :by(0.5) { say $_ } # 0, 0.5, 1.5, 2.0, 2.5, 3.0, 3.5 + If applied to a type name, it indicates the metaclass instance instead, so C<^Moose> is short for C<HOW(Moose)> or C<Moose.HOW>. It still kinda means "what is this thing's domain" in an abstract sort of way.