Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitRange as argument, feature proposal #89

Open
mirefek opened this issue Sep 26, 2020 · 0 comments
Open

UnitRange as argument, feature proposal #89

mirefek opened this issue Sep 26, 2020 · 0 comments

Comments

@mirefek
Copy link

mirefek commented Sep 26, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant