You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds TaskSeq.zip4 which combines four task sequences into a task
sequence of 4-tuples, truncating to the shortest source sequence.
This follows the same pattern as the existing zip and zip3 functions.
Files changed:
- TaskSeqInternal.fs: zip4 implementation
- TaskSeq.fs: public static member wrapper
- TaskSeq.fsi: XML-documented signature
- TaskSeq.Zip.Tests.fs: 53 new tests (null checks, empty variants,
immutable, side effects, unequal lengths, mixed types)
- README.md: marks zip4 as implemented
- release-notes.txt: updated
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -385,7 +385,7 @@ This is what has been implemented so far, is planned or skipped:
385
385
|✅[#258][]|`windowed`|`windowed`|||
386
386
|✅[#2][]|`zip`|`zip`|||
387
387
|✅|`zip3`|`zip3`|||
388
-
|||`zip4`|||
388
+
|✅||`zip4`|||
389
389
390
390
391
391
<sup>¹⁾ <aid="note1"></a>_These functions require a form of pre-materializing through `TaskSeq.cache`, similar to the approach taken in the corresponding `Seq` functions. It doesn't make much sense to have a cached async sequence. However, `AsyncSeq` does implement these, so we'll probably do so eventually as well._</sup>
///<returns>The result task sequence of 4-tuples.</returns>
1567
+
///<exception cref="T:ArgumentNullException">Thrown when any of the four input task sequences is null.</exception>
1568
+
static member zip4:
1569
+
source1:TaskSeq<'T1> ->
1570
+
source2:TaskSeq<'T2> ->
1571
+
source3:TaskSeq<'T3> ->
1572
+
source4:TaskSeq<'T4> ->
1573
+
TaskSeq<'T1 * 'T2 * 'T3 * 'T4>
1574
+
1557
1575
///<summary>
1558
1576
///argument of type <typeref name="'State" />through the computation. If the input function is <paramref name="f" />and the elements are <paramref name="i0...iN" />
1559
1577
///then computes<paramref name="f (...(f s i0)...)iN" />.
0 commit comments