Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Perl 6 prime number tools

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 META.info
Octocat-spinner-32 README
README
First stab at implementing basic prime numbers code in Perl 6. Other than the
fact it remembers the primes which have been calculated so far, nothing fancy.
It's still disturbingly slow.

Usage:


use Math::Prime;

say primes[^10];    # first ten primes
say primes[60];     # the 61st prime
say is-prime(100);  # check if a number is prime

Note that now Perl 6 has is-prime in CORE, this module is quite useless.
Something went wrong with that request. Please try again.