- Perl 6 Deep Dive
- Andrew Shitov
- 46字
- 2021-07-03 00:05:50
Checking whether the number is prime
The is-prime method returns a Boolean value, telling us whether the number is a prime number or not, as shown here:
say 10.is-prime; # False
say 11.is-prime; # True
Executing the is-prime method on big numbers may be slow.
推薦閱讀
- C++ Primer習(xí)題集(第5版)
- WildFly:New Features
- WebAssembly實(shí)戰(zhàn)
- Python計算機(jī)視覺編程
- 人人都是網(wǎng)站分析師:從分析師的視角理解網(wǎng)站和解讀數(shù)據(jù)
- 差分進(jìn)化算法及其高維多目標(biāo)優(yōu)化應(yīng)用
- Python機(jī)器學(xué)習(xí):手把手教你掌握150個精彩案例(微課視頻版)
- PHP從入門到精通(第4版)(軟件開發(fā)視頻大講堂)
- 大話Java:程序設(shè)計從入門到精通
- Node學(xué)習(xí)指南(第2版)
- Building Serverless Web Applications
- Instant Debian:Build a Web Server
- PHP+MySQL動態(tài)網(wǎng)站開發(fā)從入門到精通(視頻教學(xué)版)
- 跟戴銘學(xué)iOS編程:理順核心知識點(diǎn)
- 數(shù)據(jù)分析與挖掘算法:Python實(shí)戰(zhàn)