Primes.jl icon indicating copy to clipboard operation
Primes.jl copied to clipboard

UnitRange as argument, feature proposal

Open mirefek opened this issue 4 years ago • 0 comments

To me, it would make sense if a range could be an argument to primes by primes(r::UnitRange) = primes(r.start, r.stop) to have things such as

> primes(1:10)
4-element Array{Int64,1}:
 2
 3
 5
 7

mirefek avatar Sep 26 '20 19:09 mirefek