Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement TaskSeq.where and TaskSeq.whereAsync #217

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

abelbraaksma
Copy link
Member

@abelbraaksma abelbraaksma commented Dec 20, 2023

Part if the #208 push for functions.

Add TaskSeq.where and TaskSeq.whereAsync as aliases to filter and filterAsync, similar to how Seq does that in F# Core.

The following signatures will be added:

val where: predicate: ('T -> bool) -> source: TaskSeq<'T> -> TaskSeq<'T>
val whereAsync: predicate: ('T -> #Task<bool>) -> source: TaskSeq<'T> -> TaskSeq<'T>

these behave identical to their filter equivalents.

@abelbraaksma abelbraaksma added enhancement New feature or request topic: surface area Adds functions to the public surface area labels Dec 20, 2023
@abelbraaksma abelbraaksma merged commit b66463c into main Dec 21, 2023
6 checks passed
@abelbraaksma abelbraaksma deleted the implement-where-whereasync branch December 21, 2023 01:05
@bartelink
Copy link
Member

bartelink commented Dec 21, 2023

I (don't really) hate to be a whiner, but I detest this alias in FSharp.Core, so would prefer it not to be implemented here (and deprecated there).

(If I could have chosen only one name from the off, it would have been where, but IMO filter is de facto idiomatic, and having names matching System.Linq.Enumerable is not something that helps Seq or the other modules.)

I do get that if the rule is that it's following Seq, so logically this should be done (but you can't make me like it!)

@abelbraaksma abelbraaksma added this to the v0.4.0 milestone Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic: surface area Adds functions to the public surface area
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants