Author: masak Date: 2009-01-07 07:25:35 +0100 (Wed, 07 Jan 2009) New Revision: 24795
Modified: docs/Perl6/Spec/S29-functions.pod Log: [S29] added .succ/.pred for Num, Int and Bool Modified: docs/Perl6/Spec/S29-functions.pod =================================================================== --- docs/Perl6/Spec/S29-functions.pod 2009-01-07 06:00:46 UTC (rev 24794) +++ docs/Perl6/Spec/S29-functions.pod 2009-01-07 06:25:35 UTC (rev 24795) @@ -15,7 +15,7 @@ Moritz Lenz <mor...@faui2k3.org> Date: 12 Mar 2005 Last Modified: 7 Jan 2009 - Version: 35 + Version: 36 This document attempts to document the list of builtin functions in Perl 6. It assumes familiarity with Perl 5 and prior synopses. @@ -287,6 +287,22 @@ =over +=item succ + + our Num multi method succ ( Num $x: ) is export + out Int multi method succ ( Int $x: ) is export + +Returns the successor of C<$x>. This method is used by C<< prefix:<++> >> and +C<< postfix:<++> >> to increment the value in a container. + +=item pred + + our Num multi method pred ( Num $x: ) is export + our Int multi method pred ( Int $x: ) is export + +Returns the predeccessor of C<$x>. This method is used by C<< prefix:<--> >> +and C<< postfix:<--> >> to decrement the value in a container. + =item abs our Num multi method abs ( Num $x: ) is export @@ -458,6 +474,22 @@ =back +=head2 Bool + +=over 4 + +=item succ + + our Bool multi method succ ( Bool $b: ) is export + +Returns C<Bool::True>. + +=item pred + + our Bool multi method pred ( Bool $b: ) is export + +Returns C<Bool::False>. + =head2 Scalar B<API document>: L<Scalar>