Overload for TapIf with Func<T, bool> condition
See original GitHub issueCurrently the TapIf extensions only accept a bool parameter for the condition. I think it would be convenient to also have overloads that accept a Func<T, bool> and Func<T, E, bool> for the condition. Should these overloads be added, or are there any reasons for why they’re not there in the first place?
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
TapIf() · Issue #135 · vkhorikov/CSharpFunctionalExtensions
I find an overload with Func<T, bool> instead of just bool also handy. It will add the possibility to chain like this: Dog.Create("Lassie") ......
Read more >Using conditional return type depending on boolean ...
The simplest way to return different types based on a boolean argument would be overloads: function getStatsById(userId: string, ...
Read more >Untitled
Book club birthday party ideas, So how you doin hippo, Vasatka systems, ... Sommerfuglebusk stiklinger, Overload chart show chat, Tendurek dagi nerede, ...
Read more >Untitled
Monroe antique car swap meet, Book names for first graders, ... Green arrow comic images, Live in ten action, Osdh acute disease service,...
Read more >kernel/exynos
The fixup function can correct the problem + by calling debug_object_init ... Y6 Y5 Y4 Y3 Y2 Y1 Y0 + +Note that the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ah yes, of course.
So I think your original preferred (second) option may be best after all; it is the most consistent with the approach taken on other extension methods with many signatures (i.e. keep the implementations similar to each other and as clear as possible, to help with maintainability).
Please take a look at #188 and #174