BooleanCat / go-functional

go-functional is a library of iterators to augment the standard library
MIT License
452 stars 23 forks source link

Add .Find for iterator method chaining #69

Closed BooleanCat closed 1 year ago

BooleanCat commented 1 year ago

Please provide a brief description of the change.

Add .ForEach for iterator method chaining

Also fixes a deadlock in HashMap iterators

Which issue does this change relate to?

https://github.com/BooleanCat/go-functional/issues/55

Contribution checklist.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (504ceb2) 100.00% compared to head (86533b1) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #69 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 20 20 Lines 547 579 +32 ========================================= + Hits 547 579 +32 ``` | [Files Changed](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin) | Coverage Δ | | |---|---|---| | [iter/chain.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9jaGFpbi5nbw==) | `100.00% <100.00%> (ø)` | | | [iter/channel.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9jaGFubmVsLmdv) | `100.00% <100.00%> (ø)` | | | [iter/counter.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9jb3VudGVyLmdv) | `100.00% <100.00%> (ø)` | | | [iter/cycle.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9jeWNsZS5nbw==) | `100.00% <100.00%> (ø)` | | | [iter/drop.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9kcm9wLmdv) | `100.00% <100.00%> (ø)` | | | [iter/exhausted.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9leGhhdXN0ZWQuZ28=) | `100.00% <100.00%> (ø)` | | | [iter/filter.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9maWx0ZXIuZ28=) | `100.00% <100.00%> (ø)` | | | [iter/lift.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9saWZ0Lmdv) | `100.00% <100.00%> (ø)` | | | [iter/lines.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9saW5lcy5nbw==) | `100.00% <100.00%> (ø)` | | | [iter/map.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9tYXAuZ28=) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://app.codecov.io/gh/BooleanCat/go-functional/pull/69?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.