Skip to content

Commit 30f9f00

Browse files
committed
Add progress overview and some reorganization
1 parent 0b4615d commit 30f9f00

File tree

1 file changed

+138
-14
lines changed

1 file changed

+138
-14
lines changed

README.md

+138-14
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,151 @@ An implementation [`IAsyncEnumerable<'T>`][3] as a `taskSeq` CE for F# with acco
77

88
The `IAsyncEnumerable` interface was added to .NET in `.NET Core 3.0` and is part of `.NET Standard 2.1`. The main use-case was for iterative asynchronous enumeration over some resource. For instance, an event stream or a REST API interface with pagination, where each page is a [`MoveNextAsync`][4] call on the [`IAsyncEnumerator<'T>`][5] given by a call to [`GetAsyncEnumerator()`][6]. It has been relatively challenging to work properly with this type and dealing with each step being asynchronous, and the enumerator implementing [`IAsyncDisposable`][7] as well, which requires careful handling.
99

10+
## Short-term feature planning
11+
12+
Not necessarily in order of importance:
13+
14+
* [x] Stabilize and battle-test `taskSeq` resumable code. **DONE**
15+
* [x] A growing set of module functions `TaskSeq`, see below for progress. **DONE & IN PROGRESS**
16+
* [ ] Packaging and publishing on Nuget, **PLANNED: 13 November 2022**.
17+
* [x] Add `Async` variants for functions taking HOF arguments. **DONE**
18+
* [ ] Expand surface area based on `AsyncSeq`.
19+
* [ ] User requests?
20+
1021
## Implementation progress
1122

12-
The _resumable state machine_ backing the `taskSeq` CE is considered stable. While bugs are always possible, we will mostly focus on adding functionality there, like adding more useful overloads for `yield` and `let!`. Suggestions are welcome!
23+
### `taskSeq` CE
24+
25+
The _resumable state machine_ backing the `taskSeq` CE is now finished. Focus is now on adding functionality there, like adding more useful overloads for `yield` and `let!`. Suggestions are welcome!
26+
27+
### `TaskSeq` module functions
1328

1429
We are working hard on getting a full set of module functions on `TaskSeq` that can be used with `IAsyncEnumerable` sequences. Our guide is the set of F# `Seq` functions in F# Core and, where applicable, the functions provided from `AsyncSeq`. Each implemented function is documented through XML doc comments to provide the necessary context-sensitive help.
1530

1631
The following is the progress report:
1732

18-
TODO!
33+
| Implemented | `Seq` function | `TaskSeq` function | Extra `async` variant | Remarks |
34+
|---------------|--------------------|--------------------|-----------------------|-------------------------------------------|
35+
| | `allPairs` | `allPairs` | | |
36+
| | `append` | `append` | | |
37+
| | `average` | `averageBy` | `averageByAsync` | |
38+
| | `cache` | `cache` | | |
39+
| &#x2705; | `cast` | `cast` | | |
40+
| &#x2705; | | `box` | | |
41+
| &#x2705; | | `unbox` | | |
42+
| &#x2705; | `choose` | `choose` | `chooseAsync` | |
43+
| | `chunkBySize` | `chunkBySize` | | |
44+
| &#x2705; | `collect` | `collect` | `collectAsync` | |
45+
| | `compareWith` | `compareWith` | `compareWithAsync` | |
46+
| &#x2705; | `concat` | `concat` | | |
47+
| &#x2705; | `contains` | `contains` | | |
48+
| | `delay` | `delay` | | |
49+
| | `distinct` | `distinct` | | |
50+
| | `distinctBy` | `dictinctBy` | `distinctByAsync` | |
51+
| &#x2705; | `empty` | `empty` | | |
52+
| &#x2705; | `exactlyOne` | `exactlyOne` | | |
53+
| | `except` | `except` | | |
54+
| &#x2705; | `exists` | `exists` | | |
55+
| | `exists2` | `exists2` | | |
56+
| &#x2705; | `filter` | `filter` | `filterAsync` | |
57+
| &#x2705; | `find` | `find` | `findAsync` | |
58+
| _not planned_ | `findBack` | | | _iteration from back not possible_ |
59+
| &#x2705; | `findIndex` | `findIndex` | `findIndexAsync` | |
60+
| _not planned_ | `findIndexBack` | n/a | n/a | _iteration from back not possible_ |
61+
| &#x2705; | `fold` | `fold` | `foldAsync` | |
62+
| | `fold2` | `fold2` | `fold2Async` | |
63+
| _not planned_ | `foldBack` | | | _iteration from back not possible_ |
64+
| _not planned_ | `foldBack2` | | | _iteration from back not possible_ |
65+
| | `forall` | `forall` | `forallAsync` | |
66+
| | `forall2` | `forall2` | `forall2Async` | |
67+
| _maybe_ | `groupBy` | `groupBy` | `groupByAsync` | |
68+
| &#x2705; | `head` | `head` | | |
69+
| &#x2705; | `indexed` | `indexed` | | |
70+
| &#x2705; | `init` | `init` | `initAsync` | |
71+
| &#x2705; | `initInfinite` | `initInfinite` | `initInfiniteAsync` | |
72+
| | `insertAt` | `insertAt` | | |
73+
| | `insertManyAt` | `insertManyAt` | | |
74+
| &#x2705; | `isEmpty` | `isEmpty` | | |
75+
| &#x2705; | `item` | `item` | | |
76+
| &#x2705; | `iter` | `iter` | `iterAsync` | |
77+
| | `iter2` | `iter2` | `iter2Async` | |
78+
| &#x2705; | `iteri` | `iteri` | `iteriAsync` | |
79+
| | `iteri2` | `iteri2` | `iteri2Async` | |
80+
| &#x2705; | `last` | `last` | | |
81+
| &#x2705; | `length` | `length` | | |
82+
| &#x2705; | | `lengthBy` | `lengthByAsyn` | |
83+
| &#x2705; | `map` | `map` | `mapAsync` | |
84+
| | `map2` | `map2` | `map2Async` | |
85+
| | `map3` | `map3` | `map3Async` | |
86+
| | `mapFold` | `mapFold` | `mapFoldAsync` | |
87+
| _not planned_ | `mapFoldBack` | | | _iteration from back not possible_ |
88+
| &#x2705; | `mapi` | `mapi` | `mapiAsync` | |
89+
| | `mapi2` | `mapi2` | `mapi2Async` | |
90+
| | `max` | `max` | | |
91+
| | `maxBy` | `maxBy` | `maxByAsync` | |
92+
| | `min` | `min` | | |
93+
| | `minBy` | `minBy` | `minByAsync` | |
94+
| &#x2705; | `ofArray` | `ofArray` | | |
95+
| &#x2705; | | `ofAsyncArray` | | |
96+
| &#x2705; | | `ofAsyncList` | | |
97+
| &#x2705; | | `ofAsyncSeq` | | |
98+
| &#x2705; | `ofList` | `ofList` | | |
99+
| &#x2705; | | `ofTaskList` | | |
100+
| &#x2705; | | `ofResizeArray` | | |
101+
| &#x2705; | | `ofSeq` | | |
102+
| &#x2705; | | `ofTaskArray` | | |
103+
| &#x2705; | | `ofTaskList` | | |
104+
| &#x2705; | | `ofTaskSeq` | | |
105+
| | `pairwise` | `pairwise` | | |
106+
| | `permute` | `permute` | `permuteAsync` | |
107+
| &#x2705; | `pick` | `pick` | `pickAsync` | |
108+
| _not planned_ | `readOnly` | | | _all TaskSeq sequences are readonly_ |
109+
| | `reduce` | `reduce` | `reduceAsync` | |
110+
| _not planned_ | `reduceBack` | | | _iteration from back not possible_ |
111+
| | `removeAt` | `removeAt` | | |
112+
| | `removeManyAt` | `removeManyAt` | | |
113+
| | `replicate` | `replicate` | | |
114+
| _maybe_ | `rev` | | | |
115+
| | `scan` | `scan` | `scanAsync` | |
116+
| _not planned_ | `scanBack` | | | _iteration from back not possible_ |
117+
| | `singleton` | `singleton` | | |
118+
| | `skip` | `skip` | | |
119+
| | `skipWhile` | `skipWhile` | `skipWhileAsync` | |
120+
| _maybe_ | `sort` | | | |
121+
| _maybe_ | `sortBy` | | | |
122+
| _maybe_ | `sortByAscending` | | | |
123+
| _maybe_ | `sortByDescending` | | | |
124+
| _maybe_ | `sortWith` | | | |
125+
| | `splitInto` | `splitInto` | | |
126+
| | `sum` | `sum` | | |
127+
| | `sumBy` | `sumBy` | `sumByAsync` | |
128+
| | `tail` | `tail` | | |
129+
| | `take` | `take` | | |
130+
| | `takeWhile` | `takeWhile` | `takeWhileAsync` | |
131+
| &#x2705; | `toArray` | `toArray` | `toArrayAsync` | |
132+
| &#x2705; | | `toIList` | `toIListAsync` | |
133+
| &#x2705; | `toList` | `toList` | `toListAsync` | |
134+
| &#x2705; | | `toResizeArray` | `toResizeArrayAsync` | |
135+
| &#x2705; | | `toSeq` | `toSeqAsync` | |
136+
| | | [] | | _more convenience conversions considered_ |
137+
| _maybe_ | `transpose` | | | |
138+
| | `truncate` | `truncate` | | |
139+
| &#x2705; | `tryExactlyOne` | `tryExactlyOne` | `tryExactlyOneAsync` | |
140+
| &#x2705; | `tryFind` | `tryFind` | `tryFindAsync` | |
141+
| _not planned_ | `tryFindBack` | | | _iteration from back not possible_ |
142+
| &#x2705; | `tryFindIndex` | `tryFindIndex` | `tryFindIndexAsync` | |
143+
| _not planned_ | `tryFindIndexBack` | | | _iteration from back not possible_ |
144+
| &#x2705; | `tryHead` | `tryHead` | | |
145+
| &#x2705; | `tryItem` | `tryItem` | | |
146+
| &#x2705; | `tryLast` | `tryLast` | | |
147+
| &#x2705; | `tryPick` | `tryPick` | `tryPickAsync` | |
148+
| | `unfold` | `unfold` | `unfoldAsync` | |
149+
| | `updateAt` | `updateAt` | | |
150+
| | `where` | `where` | `whereAsync` | |
151+
| | `windowed` | `windowed` | | |
152+
| &#x2705; | `zip` | `zip` | | |
153+
| | `zip3` | `zip3` | | |
154+
| | | `zip4` |
19155

20156
### Futher reading `IAsyncEnumerable`
21157

@@ -106,18 +242,6 @@ For more info, see this PR: https://github.com/abelbraaksma/TaskSeq/pull/29.
106242
It's based on [Don Symes `taskSeq.fs`][20]
107243
but expanded with useful utility functions and a few extra binding overloads.
108244

109-
## Short-term feature planning
110-
111-
Not necessarily in order of importance:
112-
113-
- [x] A minimal base set of useful functions and sensible CE overloads, like `map`, `collect`, `fold`, `zip`. These functions will live in the module `TaskSeq`. The CE will be called `taskSeq`.
114-
- [ ] Packaging and publishing on Nuget
115-
- [ ] Provide the same surface area of functions as `Seq` in F# Core
116-
- [ ] For each function, have a "normal" function, where the operator is non-async, and an async version. I.e., `TaskSeq.map` and `TaskSeq.mapAsync`, the difference being that the `mapper` function returns a `#Task<'T>` in the second version.
117-
- [ ] Examples, documentation and tests
118-
- [ ] Expand surface area based on user requests
119-
- [ ] Improving the original code, adding benchmarks, and what have you.
120-
121245
## Current set of `TaskSeq` utility functions
122246

123247
The following is the current surface area of the `TaskSeq` utility functions. This is just a dump of the signatures with doc comments

0 commit comments

Comments
 (0)