Closed Smoren closed 1 year ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Totals | |
---|---|
Change from base Build 2224581354: | 0.3% |
Covered Lines: | 177 |
Relevant Lines: | 178 |
There is Reduce::exactlyN()
implementation in my separate branch: https://github.com/Smoren/itertools-php/blob/reduce_exactly_n/src/Reduce.php#L188
I can make another pull request for it if you want.
Hi @Smoren,
Thank you again for another pull request. I left a couple suggestions in the comments.
Mark
Hi @markrogoyski!
All your suggestions are applied.
Multi::zipStrict()
renamed to Multi::zipEqual()
.\OutOfRangeException
replaced with \LengthException
.Thank you @Smoren for the pull request. This will go out with the next release.
Thank you Mark!
@markrogoyski
By the way, I would be glad to hear your opinion about my repository, which is also inspired by python and implements the functionality of iterable sequences for PHP.
If you can find time for this, I will be very grateful.
Hi @Smoren,
Thanks for sharing the link to your sequence library.
Just one suggestion: Since PHP has a built-in range function, it might be helpful to compare and contrast your xrange
and Range
with PHP's range
so the reader knows why they might want to chose one over the other.
Hi @markrogoyski
Thank you for your feedback!
I've added more descriptions to the README file, including one on the difference between xrange and range.
However the README is designed as you have in IterTools now.
Hi! I was thinking about the details of
Reduce::exactlyN()
method implementation.To solve this task I need to check that all the given iterables are equals both by their lengths and by their values.
But when I use
Multi::zipLongest()
, I have nulls on last iterations when given iterators have different lengths. So I don't know if some iterators are ended or contain nulls in their tails.The best solution I have found was to add method
Multi::zipStrict()
which throwsOutOfRangeException
when lengths of given iterators are not the same.Here is the summary of this pull request:
Multi::zipStrict()
added.Utilities\StrictMultipleIterator
added.I hope you find this functionality useful.