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

Add TaskSeq.singleton to the surface area #90

Merged
merged 8 commits into from
Nov 24, 2022

Conversation

gusty
Copy link
Member

@gusty gusty commented Nov 13, 2022

Add singleton function:

module TaskSeq =
    val singleton: source: 'T -> taskSeq<'T>

Copy link
Member

@abelbraaksma abelbraaksma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function will need some tests. See the approach I took for empty. It won't really fit the auto-generated tests, but we should at least have coverage of the three basic cases: before/middle/after iteration and that it behaves stable with a few minimal combined tests.

I can set this up if you like.

src/FSharp.Control.TaskSeq/TaskSeq.fs Outdated Show resolved Hide resolved
src/FSharp.Control.TaskSeq/TaskSeq.fs Outdated Show resolved Hide resolved
@abelbraaksma
Copy link
Member

There's a compile error now, not sure how rebase introduced that, though:

Error: D:\a\FSharp.Control.TaskSeq\FSharp.Control.TaskSeq\src\FSharp.Control.TaskSeq\TaskSeq.fs(25,43): error FS0039: The type 'ValueTask' does not define the field, constructor or member 'FromResult'.

@abelbraaksma abelbraaksma added enhancement New feature or request topic: surface area Adds functions to the public surface area labels Nov 14, 2022
@abelbraaksma
Copy link
Member

abelbraaksma commented Nov 24, 2022

This should fix the compile error (rebase with main) ☝️.

Edit, accidentally merged with main from the fork, confusing. Anyway, retry 👇

@abelbraaksma abelbraaksma changed the title + singleton Add TaskSeq.singleton to the surface area Nov 24, 2022
@abelbraaksma abelbraaksma merged commit c1872ec into fsprojects:main Nov 24, 2022
@abelbraaksma
Copy link
Member

abelbraaksma commented Nov 25, 2022

Thanks for this! Merged into main now. Will be part of version 0.3.0.

@abelbraaksma abelbraaksma added this to the v0.3.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.

2 participants