Skip to content

[Repo Assist] feat: add TaskSeq.allPairs (69 tests)#333

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/feat-allpairs-2026-03-11-c8bdfe24df0e1c5f
Draft

[Repo Assist] feat: add TaskSeq.allPairs (69 tests)#333
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/feat-allpairs-2026-03-11-c8bdfe24df0e1c5f

Conversation

@github-actions
Copy link
Contributor

🤖 This is a draft PR from Repo Assist, an automated AI assistant.

Implements TaskSeq.allPairs, which returns a task sequence of all pairings of elements from two input task sequences — matching the behaviour of Seq.allPairs.

API

TaskSeq.allPairs : source1: TaskSeq<'T1> -> source2: TaskSeq<'T2> -> TaskSeq<'T1 * 'T2>
```

`source2` is fully materialised (into a `ResizeArray`) before the result sequence is iterated. `source1` is consumed lazily. Output is in row-major order: for each element of `source1`, all elements of `source2` appear in sequence.

## Files changed

- `TaskSeqInternal.fs` — `allPairs` implementation using `toResizeArrayAsync` + nested `for` loops inside `taskSeq`
- `TaskSeq.fs` — public `static member` wrapper
- `TaskSeq.fsi` — XML-documented signature (after `zip3`)
- `TaskSeq.AllPairs.Tests.fs` — 69 new tests (new file)
- `FSharp.Control.TaskSeq.Test.fsproj` — includes new test file
- `README.md` — marks `allPairs` as ✅ implemented
- `release-notes.txt` — updated

## Test Status

Build and full test suite verified:

```
Build succeeded.
    0 Warning(s)
    0 Error(s)

Passed! - Failed: 0, Passed: 4599, Skipped: 2, Total: 4601

Formatting verified with dotnet fantomas . --check — no issues.

Design notes

  • source2 must be pre-materialised because it is iterated once per element of source1. The XML doc makes this explicit.
  • The implementation mirrors how Seq.allPairs works: nested iteration with the outer loop over source1.
  • No new DU variants or abstractions needed — the implementation is a single taskSeq expression.
  • source1 is never materialised, so allPairs works correctly on infinite sequences as source1.

Generated by Repo Assist ·

To install this agentic workflow, run

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

Implements TaskSeq.allPairs which returns all pairings of elements
from two task sequences. source2 is fully materialised before iteration
begins; source1 is consumed lazily.

- TaskSeqInternal.fs: allPairs implementation (materialises source2 via toResizeArrayAsync)
- TaskSeq.fs / .fsi: public API with XML documentation
- TaskSeq.AllPairs.Tests.fs: 69 new tests
- README.md: mark allPairs as implemented
- release-notes.txt: updated

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.

0 participants