[Repo Assist] Add AsyncSeq.unzip, unzip3, map2, map3#318
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
[Repo Assist] Add AsyncSeq.unzip, unzip3, map2, map3#318github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Adds four new combinators to fill F# collection API parity gaps:
AsyncSeq.unzipAsyncSeq<'T1 * 'T2>intoAsync<'T1[] * 'T2[]>List.unzipAsyncSeq.unzip3AsyncSeq<'T1 * 'T2 * 'T3>intoAsync<'T1[] * 'T2[] * 'T3[]>List.unzip3AsyncSeq.map2Seq.map2AsyncSeq.map3List.map3Motivation
unzip/unzip3are the natural inverse ofzip/zip3(already present). Developers who usezipto combine sequences will naturally wantunzipto split them.map2/map3mirror the familiarSeq.map2/List.map3names and allow discoverability for F# developers who expect F# core module naming conventions.Implementation Details
unzipandunzip3: enumerate the source sequence once intoList<T>buffers, then return arrays. Simple, allocation-efficient.map2andmap3: thin wrappers over the existingzipWithandzipWith3— no new logic, just the familiar F# module naming..fsisignature file updated with XML doc comments.RELEASE_NOTES.mdupdated under the4.16.0entry.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)