- Perl 6 Deep Dive
- Andrew Shitov
- 51字
- 2021-07-03 00:05:51
Getting the numerator and denominator
To get the two parts of a Rat value, use the numerator and denominator methods. Let's take a look at how they work on the example of the value from the previous section:
my $x = 10/3;
say $x.numerator; # 10
say $x.denominator; # 3
推薦閱讀
- Functional Python Programming
- Apache ZooKeeper Essentials
- Learning Selenium Testing Tools with Python
- JavaScript Unlocked
- Vue.js 3.0源碼解析(微課視頻版)
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優(yōu)化計算
- 秒懂設計模式
- Apache Kafka Quick Start Guide
- Swift語言實戰(zhàn)精講
- Learning YARN
- Webpack實戰(zhàn):入門、進階與調優(yōu)(第2版)
- Python程序設計開發(fā)寶典
- Drupal 8 Development Cookbook(Second Edition)
- Raspberry Pi Blueprints
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐