@@ -19,11 +19,11 @@ type AsyncSeq<'T> = IAsyncEnumerable<'T>
1919
2020[<RequireQualifiedAccess>]
2121module AsyncSeq =
22- /// Creates an empty asynchronou sequence that immediately ends
22+ /// Creates an empty asynchronous sequence that immediately ends.
2323 [<GeneralizableValueAttribute>]
2424 val empty < 'T > : AsyncSeq < 'T >
2525
26- /// Creates an asynchronous sequence that generates a single element and then ends
26+ /// Creates an asynchronous sequence that generates a single element and then ends.
2727 val singleton : v : 'T -> AsyncSeq < 'T >
2828
2929 /// Generates a finite async sequence using the specified asynchronous initialization function.
@@ -32,10 +32,10 @@ module AsyncSeq =
3232 /// Generates a finite async sequence using the specified initialization function.
3333 val init : count : int64 -> mapping :( int64 -> 'T ) -> AsyncSeq < 'T >
3434
35- /// Generates an async sequence using the specified asynchronous initialization function.
35+ /// Generates an infinite async sequence using the specified asynchronous initialization function.
3636 val initInfiniteAsync : mapping :( int64 -> Async < 'T >) -> AsyncSeq < 'T >
3737
38- /// Generates an async sequence using the specified initialization function.
38+ /// Generates an infinite async sequence using the specified initialization function.
3939 val initInfinite : mapping :( int64 -> 'T ) -> AsyncSeq < 'T >
4040
4141 /// Generates an async sequence using the specified asynchronous generator function.
@@ -47,7 +47,7 @@ module AsyncSeq =
4747 /// Creates an async sequence which repeats the specified value the indicated number of times.
4848 val replicate : count : int -> v : 'T -> AsyncSeq < 'T >
4949
50- /// Creates an async sequence which repeats the specified value indefinitely .
50+ /// Creates an infinite async sequence which repeats the specified value.
5151 val replicateInfinite : v : 'T -> AsyncSeq < 'T >
5252
5353 /// Yields all elements of the first asynchronous sequence and then
@@ -185,9 +185,20 @@ module AsyncSeq =
185185 /// Asynchronously determine if the sequence contains the given value
186186 val contains : value : 'T -> source : AsyncSeq < 'T > -> Async < bool > when 'T : equality
187187
188- /// Asynchronously pick a value from a sequence
188+ /// Asynchronously pick a value from a sequence based on the specified chooser function.
189+ val tryPickAsync : chooser :( 'T -> Async < 'TResult option >) -> source : AsyncSeq < 'T > -> Async < 'TResult option >
190+
191+ /// Asynchronously pick a value from a sequence based on the specified chooser function.
189192 val tryPick : chooser :( 'T -> 'TResult option ) -> source : AsyncSeq < 'T > -> Async < 'TResult option >
190193
194+ /// Asynchronously pick a value from a sequence based on the specified chooser function.
195+ /// Raises KeyNotFoundException if the chooser function can't find a matching key.
196+ val pickAsync : chooser :( 'T -> Async < 'TResult option >) -> source : AsyncSeq < 'T > -> Async < 'TResult >
197+
198+ /// Asynchronously pick a value from a sequence based on the specified chooser function.
199+ /// Raises KeyNotFoundException if the chooser function can't find a matching key.
200+ val pick : chooser :( 'T -> 'TResult option ) -> source : AsyncSeq < 'T > -> Async < 'TResult >
201+
191202 /// Asynchronously find the first value in a sequence for which the predicate returns true
192203 val tryFind : predicate :( 'T -> bool ) -> source : AsyncSeq < 'T > -> Async < 'T option >
193204
@@ -420,7 +431,7 @@ module Seq =
420431 val ofAsyncSeq : source : AsyncSeq < 'T > -> seq < 'T >
421432
422433
423- /// An async sequence source.
434+ /// An async sequence source produces async sequences .
424435type AsyncSeqSrc < 'T >
425436
426437/// Operations on async sequence sources.
@@ -429,15 +440,16 @@ module AsyncSeqSrc =
429440 /// Creates a new async sequence source.
430441 val create : unit -> AsyncSeqSrc < 'T >
431442
432- /// Puts an item into the async sequence source causing any created async sequences to yield the item.
443+ /// Causes any async sequences created before the call to yield the item.
433444 val put : item : 'T -> src : AsyncSeqSrc < 'T > -> unit
434445
435- /// Closes the async sequence source casuing any created async sequences to terminate .
446+ /// Closes the async sequence source casuing any created async sequences to complete .
436447 val close : src : AsyncSeqSrc < 'T > -> unit
437448
438- /// Causes async sequence created immediately before the call to raise an exception.
439- val fail : exn : exn -> src : AsyncSeqSrc < 'T > -> unit
449+ /// Causes async sequence created before the call to raise an exception.
450+ val error : exn : exn -> src : AsyncSeqSrc < 'T > -> unit
440451
441452 /// Creates an async sequence which yields values as they are put into the source and terminates
442453 /// when the source is closed. This sequence will yield items starting with the next put.
454+ /// Many async sequences can be created from once source.
443455 val toAsyncSeq : src : AsyncSeqSrc < 'T > -> AsyncSeq < 'T >
0 commit comments