-
Notifications
You must be signed in to change notification settings - Fork 3
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
icount
masks the icount
function from the iterators
package, but does not include iterators::icount
's functionality
#39
Comments
You make some good points. I'll address them later today. |
Before I address the |
First off, this is an issue that crops up with various packages, e.g., @gwerbin Suggestions for improvement? |
@ramhiser I'm aware of how masking works in R, and it's impossible to always account for it. However in both of the cases you mentioned, the newer package offers the functionality that was masked, but in another form. The main issue here isn't so much the masking as it is the inconsistency, and the fact that |
My apologies if I sounded pedantic. I get what you are saying, but I point you to the classic Regardless, I like your idea of the optional stopping point. I'll add |
The
iterators
version oficount
generates integer sequences with a fixed step size of 1, starting from 1, either forever (with no argument) or until a specified stopping point is reached. Theitertools2
version generates infinite integer sequences with a specified step size.There are two problems with this:
icount
is part of theiterators
package and notitertools
, so I don't feel it's appropriate to mask.itertools2
will drastically alter the behavior of the function, necessitating defensive::
s everywhere.I understand that your
icount
function is closer to Python's thanitertools::icount
. Your thoughts?And by the way, a brief comparison of
itertools
anditertools2
would be a nice addition to the readme.The text was updated successfully, but these errors were encountered: