BooleanCat / go-functional

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

Refactor Filter #71

Closed William-Young-97 closed 1 year ago

William-Young-97 commented 1 year ago

Please provide a brief description of the change.

Which issue does this change relate to?

#59

Contribution checklist.

Replace the space in each box with "X" to check it off.

Additional context

Unsure how whether about the mentioned methods that haven't been done due to .Filter being constrained to Integers. Unsure about whether a generic Filter[T] function needs to be added to iter.go

BooleanCat commented 1 year ago

@William-Young-97 I've run the tests so you can see if there are any problems I missed.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (d6bd636) 100.00% compared to head (556d580) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #71 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 20 20 Lines 579 599 +20 ========================================= + Hits 579 599 +20 ``` | [Files Changed](https://app.codecov.io/gh/BooleanCat/go-functional/pull/71?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/71?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/71?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/71?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/71?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/71?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/71?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/71?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/71?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/repeat.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci9yZXBlYXQuZ28=) | `100.00% <100.00%> (ø)` | | | [iter/take.go](https://app.codecov.io/gh/BooleanCat/go-functional/pull/71?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Tom+Godkin#diff-aXRlci90YWtlLmdv) | `100.00% <100.00%> (ø)` | |

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