Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #744 from perl6/molecules-patch-1
Bool.succ, .pred methods explained
  • Loading branch information
molecules committed Jul 22, 2016
2 parents d8d26e2 + 30c2714 commit 657c0e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/Type/Bool.pod6
Expand Up @@ -19,6 +19,8 @@ Returns C<True>.
say True.succ; # True
say False.succ; # True
C<succ> is short for successor. In many languages, the C<succ> function is used to return the "next" enum, also known as the successor. Bool is a special enum with only two values, C<False> and C<True>. When sorted, C<False> comes first, so C<True> is its successor. And since C<True> is the "highest" Bool enum, its own successor is also C<True>.
=head2 routine pred
method pred() returns Bool:D
Expand All @@ -28,6 +30,8 @@ Returns C<False>.
say True.pred; # False
say False.pred; # False
C<pred> is short for predecessor. In many languages, the C<pred> function is used to return the "previous" enum, also known as the predecessor. Bool is a special enum with only two values, C<False> and C<True>. When sorted, C<False> comes first, so C<False> is the predecessor to C<True>. And since C<False> is the "loweset" Bool enum, its own predecessor is also C<False>.
=head2 routine enums
method enums() returns Hash:D
Expand Down

0 comments on commit 657c0e0

Please sign in to comment.