Skip to content

[Repo Assist] Add AsyncSeq.unzip, unzip3, map2, map3#318

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/improve-unzip-map2-map3-20260423-500215a10a9a2b49
Draft

[Repo Assist] Add AsyncSeq.unzip, unzip3, map2, map3#318
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/improve-unzip-map2-map3-20260423-500215a10a9a2b49

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

Summary

Adds four new combinators to fill F# collection API parity gaps:

Function Description Mirrors
AsyncSeq.unzip Splits AsyncSeq<'T1 * 'T2> into Async<'T1[] * 'T2[]> List.unzip
AsyncSeq.unzip3 Splits AsyncSeq<'T1 * 'T2 * 'T3> into Async<'T1[] * 'T2[] * 'T3[]> List.unzip3
AsyncSeq.map2 Applies a function pairwise over two async sequences Seq.map2
AsyncSeq.map3 Applies a function over corresponding elements of three async sequences List.map3

Motivation

unzip/unzip3 are the natural inverse of zip/zip3 (already present). Developers who use zip to combine sequences will naturally want unzip to split them. map2/map3 mirror the familiar Seq.map2 / List.map3 names and allow discoverability for F# developers who expect F# core module naming conventions.

Implementation Details

  • unzip and unzip3: enumerate the source sequence once into List<T> buffers, then return arrays. Simple, allocation-efficient.
  • map2 and map3: thin wrappers over the existing zipWith and zipWith3 — no new logic, just the familiar F# module naming.
  • .fsi signature file updated with XML doc comments.
  • RELEASE_NOTES.md updated under the 4.16.0 entry.

Test Status

Build: 0 errors, 12 pre-existing warnings
Tests: 431/431 passed (9 new tests added covering normal, empty, and short-circuit cases for all four functions)

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

…ions

- unzip: splits AsyncSeq<'T1 * 'T2> into Async<'T1[] * 'T2[]>, mirrors List.unzip
- unzip3: splits AsyncSeq<'T1 * 'T2 * 'T3> into Async<'T1[] * 'T2[] * 'T3[]>, mirrors List.unzip3
- map2: applies function pairwise over two async sequences, mirrors Seq.map2 (thin wrapper over zipWith)
- map3: applies function over three async sequences, mirrors List.map3 (thin wrapper over zipWith3)
9 new tests; 431/431 pass

Co-authored-by: Copilot <[email protected]>
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