Changeset 15500 for docs/Perl6/Spec

Show
Ignore:
Timestamp:
03/07/07 10:06:22 (21 months ago)
Author:
audreyt
Message:

* In "foo".join(1,2,3), "foo" is the separator.
* index("foo", "bar") should really be -1, or something that

numifies to -1, lest the universe collapses.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/Perl6/Spec/Functions.pod

    r15327 r15500  
    744744=item join 
    745745 
    746  our Str multi method join ( @values: Str $separator = ' ' ) 
     746 our Str multi method join ( $separator: @values ) 
    747747 our Str multi join ( Str $separator = ' ', *@values ) 
    748748 
    749749C<join> returns a single string comprised of all of the elements 
    750 of C<@values>, separated by C<$separator>. The separator defaults 
    751 to a single space. 
     750of C<@values>, separated by C<$separator>. 
    752751 
    753752Given an empty list, C<join> returns the empty string. 
    754753 
    755 To join with no separator you can use the C<[~]> reduce operator. 
     754The separator defaults to a single space.  To join with no separator, 
     755you can use the C<[~]> reduce operator. 
    756756 
    757757=item map 
     
    11361136 
    11371137If the substring is found, then the position of the first character of 
    1138 the substring is returned. If the substring is not found, then 
    1139 undef is returned. 
     1138the substring is returned. If the substring is not found, then C<-1> is 
     1139returned. [Conjecture: Could it be "-1 but Undef" or something?] 
    11401140 
    11411141=item pack