P39 - A list of prime numbers.
Author: Curtis "Ovid" Poe
Specification
P39 (*) A list of prime numbers. Given a range of integers by its lower and upper limit, construct a list of all prime numbers in that range.
Example
> say ~ grep { .is-prime }, 10..19; 11 13 17 19
Source code: P39-rhebus.pl
use v6; # we can call it with a range, as in the specification... say ~ grep { .is-prime }, 10..20; # or we can pass a list... say ~ grep { .is-prime }, 3,5,17,257,65537; # or another range say ~ grep { .is-prime }, 1..100;