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 four new functions mirroring Array.findBack / List.findBack from
the F# standard library:
- tryFindBackAsync: returns the last element satisfying an async predicate, or None
- tryFindBack: synchronous predicate variant of the above
- findBackAsync: like tryFindBackAsync but raises KeyNotFoundException
- findBack: like tryFindBack but raises KeyNotFoundException
Implementation scans the entire sequence, keeping track of the last
matching element. 10 new tests added; all 382 tests pass.
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
### 4.11.0
2
2
3
+
* Added `AsyncSeq.tryFindBack` / `AsyncSeq.tryFindBackAsync` — return the last element in the sequence satisfying a (sync or async) predicate, or `None` if no such element exists. The entire sequence is consumed.
4
+
* Added `AsyncSeq.findBack` / `AsyncSeq.findBackAsync` — like `tryFindBack`/`tryFindBackAsync` but raise `KeyNotFoundException` when no matching element is found. Mirrors `Array.findBack` and `List.findBack`.
3
5
* Performance: `mapiAsync` — replaced `asyncSeq`-builder + `collect` implementation with a direct optimised enumerator (`OptimizedMapiAsyncEnumerator`), eliminating `collect` overhead and bringing per-element cost in line with `mapAsync`. Benchmarks added in `AsyncSeqMapiBenchmarks`.
4
6
* Design parity with FSharp.Control.TaskSeq (#277, batch 2):
5
7
* Added `AsyncSeq.tryTail` — returns `None` if the sequence is empty; otherwise returns `Some` of the tail. Safe counterpart to `tail`. Mirrors `TaskSeq.tryTail`.
0 commit comments