Skip to content

[Repo Assist] feat: add TaskSeq.map3 and TaskSeq.map3Async (81 tests)#331

Closed
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/feat-map3-2026-03-11-740fb9f30e934abf
Closed

[Repo Assist] feat: add TaskSeq.map3 and TaskSeq.map3Async (81 tests)#331
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/feat-map3-2026-03-11-740fb9f30e934abf

Conversation

@github-actions
Copy link
Contributor

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

Implements TaskSeq.map3 and TaskSeq.map3Async, which apply a mapping function to the corresponding elements of three task sequences in parallel, stopping when the shortest sequence is exhausted — matching the behaviour of Seq.map3.

API

TaskSeq.map3      : mapping: ('T1 -> 'T2 -> 'T3 -> 'U)         -> source1: TaskSeq<'T1> -> source2: TaskSeq<'T2> -> source3: TaskSeq<'T3> -> TaskSeq<'U>
TaskSeq.map3Async : mapping: ('T1 -> 'T2 -> 'T3 -> #Task<'U>) -> source1: TaskSeq<'T1> -> source2: TaskSeq<'T2> -> source3: TaskSeq<'T3> -> TaskSeq<'U>
```

## Files changed

- `TaskSeqInternal.fs` — `map3` / `map3Async` implementations, modelled on the existing `zip3`
- `TaskSeq.fs` — public `static member` wrappers
- `TaskSeq.fsi` — XML-documented signatures (after `mapiAsync`)
- `TaskSeq.Map3.Tests.fs` — 81 new tests (new file)
- `FSharp.Control.TaskSeq.Test.fsproj` — includes new test file
- `README.md` — marks `map3` / `map3Async` 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: 4611, Skipped: 2, Total: 4613

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

Trade-offs / Notes

  • Implementation is a direct parallel of zip3: opens three enumerators, advances them simultaneously on each step, stops at the first exhausted sequence.
  • No new DU cases needed; map3 and map3Async are top-level functions (unlike map/mapi which share the Action DU), because their arity and type-safety requirements are different.
  • This PR is independent of the pending map2 PR ([Repo Assist] feat: add TaskSeq.map2, map2Async, iter2, iter2Async (124 tests) #322) — no merge dependency.

Generated by Repo Assist ·

To install this agentic workflow, run

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

Implements TaskSeq.map3 and TaskSeq.map3Async, which apply a mapping
function to corresponding elements of three task sequences in parallel,
stopping when the shortest sequence is exhausted.

- TaskSeqInternal.fs: add map3/map3Async implementations modelled on zip3
- TaskSeq.fs: add public static member wrappers
- TaskSeq.fsi: add XML-documented signatures
- TaskSeq.Map3.Tests.fs: 81 new tests (null checks, empty, immutable, side effects)
- README.md: mark map3/map3Async as implemented
- release-notes.txt: updated

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme closed this Mar 12, 2026
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.

1 participant