Changeset 20196 for docs

Show
Ignore:
Timestamp:
03/31/08 20:23:51 (9 months ago)
Author:
lwall
Message:

[S29] rand is now 0-ary or method only

Files:
1 modified

Legend:

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

    r19997 r20196  
    1313                Mark Stosberg <mark@summersault.com> 
    1414 Date:          12 Mar 2005 
    15  Last Modified: 24 Jan 2008 
    16  Version:       19 
     15 Last Modified: 31 Jan 2008 
     16 Version:       20 
    1717 
    1818This document attempts to document the list of builtin functions in Perl 6. 
     
    296296=item rand 
    297297 
    298  our Num multi method rand ( Num $x: ) 
    299  our Num multi rand ( Num $x = 1 ) 
     298 our Num method rand ( Num $x: ) 
     299 our Num term:<rand> 
    300300 
    301301Pseudo random number in range C<< 0 ..^ $x >>.  That is, C<0> is 
    302 theoretically possible, while C<$x> is not. 
    303  
     302theoretically possible, while C<$x> is not.  The C<rand> function 
     303is 0-ary and always produces a number from C<0..^1>.  In any case, 
     304for picking a random integer you probably want to use something like 
     305C<(1..6).pick> instead. 
    304306 
    305307=item sign