r29923 - docs/Perl6/Spec

2010-03-02 Thread pugs-commits
Author: lwall
Date: 2010-03-03 02:03:19 +0100 (Wed, 03 Mar 2010)
New Revision: 29923

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] some clarifications of how a series deals with types (or doesn't) for 
colomon++


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2010-03-03 01:00:25 UTC (rev 29922)
+++ docs/Perl6/Spec/S03-operators.pod   2010-03-03 01:03:19 UTC (rev 29923)
@@ -15,8 +15,8 @@
 
 Created: 8 Mar 2004
 
-Last Modified: 19 Feb 2010
-Version: 194
+Last Modified: 2 Mar 2010
+Version: 195
 
 =head1 Overview
 
@@ -1888,7 +1888,12 @@
 
 1,1,{ $^a + 1, $^b * 2 }...*   # 1,1,2,2,3,4,4,8,5,16,6,32...
 
-If no closure is provided, and the sequence is obviously
+A series operator generated from an explicit function places no type
+constraints on the series other than those constraints implied by
+the signature of the function.  If the signature of the function does
+not match the existing values, the series terminates.
+
+If no closure is provided, and the sequence is numeric, and is obviously
 arithmetic or geometric (from examining its I 3 values), the appropriate 
function is deduced:
 
 1, 3, 5 ... *   # odd numbers
@@ -1934,7 +1939,8 @@
 1,2,3 ... *
 <1 2 3> ... *
 
-Likewise these come out the same:
+Likewise, if the given value or values are not numeric, C<.succ> is assumed,
+so these come out the same:
 
 'a' .. *
 'a' ... *
@@ -1942,7 +1948,8 @@
 'a','b','c' ... *
  ... *
 
-If the list on the left is C, we use the function C<{Nil}>.
+If the list on the left is C, we use the function C<{Nil}> to generate an
+infinite supply of nothing.
 
 For intuited numeric generators that don't involve geometric sign changes, all
 values are assumed to be monotonically increasing or decreasing, as determined



r29928 - docs/Perl6/Spec

2010-03-02 Thread pugs-commits
Author: lwall
Date: 2010-03-03 06:01:30 +0100 (Wed, 03 Mar 2010)
New Revision: 29928

Modified:
   docs/Perl6/Spec/S03-operators.pod
Log:
[S03] clarify the way Pair.ACCEPTS uses "so" and "not" semantics


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2010-03-03 03:25:06 UTC (rev 29927)
+++ docs/Perl6/Spec/S03-operators.pod   2010-03-03 05:01:30 UTC (rev 29928)
@@ -16,7 +16,7 @@
 Created: 8 Mar 2004
 
 Last Modified: 2 Mar 2010
-Version: 195
+Version: 196
 
 =head1 Overview
 
@@ -2579,13 +2579,25 @@
 
 is the same as
 
-if $filename.IO.e { say "exists" }
+if so $filename.IO.e { say "exists" }
 
+Likewise
+
+if $filename.IO ~~ :!e { say "exists" }
+
+is the same as
+
+if not $filename.IO.e { say "exists" }
+
 The 1st form actually translates to the latter form, so the object's
 class decides how to dispatch methods.  It just happens that the
 C role defaults to the expected filetest semantics, but C<$regex.i> might
-tell you whether the regex is case insensitive, for instance.
+tell you whether the regex is case insensitive, for instance.  Likewise,
+you can test anything for definedness or undefinedness:
 
+$obj ~~ :defined
+$obj ~~ :!defined
+
 Using the pattern form, multiple tests may be combined via junctions:
 
 given $handle {
@@ -2604,7 +2616,8 @@
 when :r & :w & :x
 when all(:r,:w,:x)
 
-The pair forms are useful only for boolean tests, so the
+The pair forms are useful only for boolean tests because the method's
+value is evaluated as a boolen, so the
 method form must be used for any numeric-based tests:
 
 if stat($filename).s > 1024 {...}