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
Implements the remaining sort/rev family of functions that were previously
marked as '?' in the README (requiring pre-materialisation before streaming).
New functions:
- TaskSeq.rev — reverses by materialising into array first
- TaskSeq.sort — ascending natural comparison sort
- TaskSeq.sortDescending — descending natural comparison sort
- TaskSeq.sortBy — ascending sort by projection (sync)
- TaskSeq.sortByAsync — ascending sort by projection (async)
- TaskSeq.sortByDescending — descending sort by projection (sync)
- TaskSeq.sortByDescendingAsync — descending sort by projection (async)
- TaskSeq.sortWith — sort using custom comparison function
All functions materialise the full input sequence, apply the corresponding
Array sort primitive, then stream elements back as a TaskSeq.
Includes 101 tests. README and release-notes updated.
Co-authored-by: Copilot <[email protected]>
|❓|`rev`|||[note #1](#note1"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.")|
344
+
|✅|`rev`|`rev`||materializes sequence before yielding|
345
345
||`scan`|`scan`|`scanAsync`||
346
346
|🚫|`scanBack`|||[note #2](#note2"Because of the async nature of TaskSeq sequences, iterating from the back would be bad practice. Instead, materialize the sequence to a list or array and then apply the 'Back' iterators.")|
|❓|`sort`|||[note #1](#note1"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.")|
352
-
|❓|`sortBy`|||[note #1](#note1"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.")|
353
-
|❓|`sortByAscending`|||[note #1](#note1"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.")|
354
-
|❓|`sortByDescending`|||[note #1](#note1"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.")|
355
-
|❓|`sortWith`|||[note #1](#note1"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.")|
351
+
|✅|`sort`|`sort`|| materializes sequence before yielding |
352
+
|||`sortDescending`|| materializes sequence before yielding |
353
+
|✅|`sortBy`|`sortBy`|`sortByAsync`| materializes sequence before yielding |
354
+
|✅|`sortByAscending`|`sortBy`|`sortByAsync`| same as `sortBy`; materializes sequence before yielding |
355
+
|✅|`sortByDescending`|`sortByDescending`|`sortByDescendingAsync`| materializes sequence before yielding |
356
+
|✅|`sortWith`|`sortWith`|| materializes sequence before yielding |
0 commit comments