Skip to content

[Repo Assist] Design parity with TaskSeq, batch 2 (#277)#281

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/design-parity-277-batch2-f661b8cc88e91242
Draft

[Repo Assist] Design parity with TaskSeq, batch 2 (#277)#281
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/design-parity-277-batch2-f661b8cc88e91242

Conversation

@github-actions
Copy link
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Continues the design-parity work tracked in #277 by adding 11 more functions that are present in FSharp.Control.TaskSeq but were missing from AsyncSeq.

All functions follow existing AsyncSeq naming conventions (sync + async variants where applicable), include XML-doc, are covered by new tests, and compile with no new warnings.

New functions

Function(s) Description TaskSeq parity
tryTail Returns None if empty; otherwise Some(tail) TaskSeq.tryTail
where / whereAsync Aliases for filter / filterAsync TaskSeq.where / whereAsync
lengthBy / lengthByAsync Count elements satisfying a predicate TaskSeq.lengthBy / lengthByAsync
compareWith / compareWithAsync Lexicographic sequence comparison TaskSeq.compareWith / compareWithAsync
takeWhileInclusiveAsync Async variant of existing takeWhileInclusive TaskSeq.takeWhileInclusiveAsync
skipWhileInclusive / skipWhileInclusiveAsync Skip while predicate holds AND skip the boundary element TaskSeq.skipWhileInclusive / skipWhileInclusiveAsync
appendSeq Appends a seq<'T> after an async sequence TaskSeq.appendSeq
prependSeq Prepends a seq<'T> before an async sequence TaskSeq.prependSeq
delay Defers sequence creation to enumeration time TaskSeq.delay
collectAsync Like collect but with an 'T -> Async(AsyncSeq<'U)> mapping TaskSeq.collectAsync
partition / partitionAsync Split into two arrays by (async) predicate TaskSeq.partition / partitionAsync

Remaining gap (not in this PR)

These items from the original analysis in #277 remain for future work:

  • insertManyAt / removeManyAt — bulk index-based insert/remove
  • exceptOfSeqexcept that takes seq rather than AsyncSeq
  • box / unbox / cast — type helpers (lower priority)
  • lengthOrMax — capped length (lower priority)

Changes

  • src/FSharp.Control.AsyncSeq/AsyncSeq.fs — 11 new function implementations
  • src/FSharp.Control.AsyncSeq/AsyncSeq.fsi — 18 new public signatures with XML-doc
  • tests/FSharp.Control.AsyncSeq.Tests/AsyncSeqTests.fs — 23 new tests
  • RELEASE_NOTES.md — 4.11.0 entry
  • version.props — bumped to 4.11.0

Test Status

✅ Build succeeded (0 errors, pre-existing warnings only — NU1605, FS9999 for groupByAsync).

✅ All 348 tests pass (dotnet test tests/FSharp.Control.AsyncSeq.Tests/...) — 25 new, 323 pre-existing.

Generated by Repo Assist for issue #277 ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@346204513ecfa08b81566450d7d599556807389f

Add 11 functions missing from AsyncSeq relative to FSharp.Control.TaskSeq:
- tryTail, where/whereAsync, lengthBy/lengthByAsync, compareWith/compareWithAsync
- takeWhileInclusiveAsync, skipWhileInclusive/skipWhileInclusiveAsync
- appendSeq/prependSeq, delay, collectAsync, partition/partitionAsync

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

We want design parity with FSharp.Control.TaskSeq

0 participants