- Perl 6 Deep Dive
- Andrew Shitov
- 64字
- 2021-07-03 00:05:52
Using pred and succ
The two methods, pred and succ, have a feature caused by the very limited range of the available values. You should not expect the values to be looped. The results of the methods are shown in the comments in the following piece of code:
say True.pred; # False
say True.succ; # True
say False.pred; # False
say False.succ; # True
推薦閱讀