markrogoyski / itertools-php

PHP Iteration Tools Library
MIT License
140 stars 11 forks source link

Stream::print(): $glue param added. #11

Closed Smoren closed 1 year ago

Smoren commented 1 year ago

Stream::print(): $glue param added.

I think there is a common task to print collections with glue (e. g. ,).

Since this branch starts from single_chunkwise this PR makes sense to merge after the merge of previous PR.

Sorry for this confusion.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3924885084


Totals Coverage Status
Change from base Build 3924811668: 0.005%
Covered Lines: 306
Relevant Lines: 307

💛 - Coveralls
Smoren commented 1 year ago

Hi @markrogoyski

I've resolved confilicts and added descriptions for side effect terminal operations to the READE file.

Smoren commented 1 year ago

I've rebased this branch from develop.

markrogoyski commented 1 year ago

Hi @Smoren,

Thank you for the suggestion. I took a different approach to implementing this.

In this commit I add Reduce::toString() with not only an optional separator (glue) but also optional prefix and suffix: https://github.com/markrogoyski/itertools-php/commit/471c59bce5b9fc31e5db93c5966032977c0f1c22

In this commit I add these options to Stream::print as well: https://github.com/markrogoyski/itertools-php/commit/b335c45071b96983ecf572c679182b9646e4bcd0

Thanks again for the feature suggestion. Mark

Smoren commented 1 year ago

OK. Good idea. Thank you for this functionality!

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 3922633442

Warning: This coverage report may be inaccurate.

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.

Details


Totals Coverage Status
Change from base Build 3921770479: 0.02%
Covered Lines: 299
Relevant Lines: 302

💛 - Coveralls