diff --git a/src/FSharp.Control.TaskSeq/TaskSeq.fsi b/src/FSharp.Control.TaskSeq/TaskSeq.fsi index acb4274d..1a0b8339 100644 --- a/src/FSharp.Control.TaskSeq/TaskSeq.fsi +++ b/src/FSharp.Control.TaskSeq/TaskSeq.fsi @@ -14,7 +14,6 @@ module TaskSeq = /// /// /// The input item to use as the single value for the task sequence. - /// Thrown when the input sequence is null. val singleton: value: 'T -> taskSeq<'T> /// @@ -22,7 +21,7 @@ module TaskSeq = /// /// /// The input task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence is null. val isEmpty: source: taskSeq<'T> -> Task /// @@ -31,7 +30,7 @@ module TaskSeq = /// /// /// The input task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence is null. val length: source: taskSeq<'T> -> Task /// @@ -42,28 +41,29 @@ module TaskSeq = /// /// The maximum value to return and the maximum items to count. /// The input task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence is null. val lengthOrMax: max: int -> source: taskSeq<'T> -> Task /// /// Returns the length of the sequence of all items for which the returns true. /// This operation requires the whole sequence to be evaluated and should not be used on potentially infinite sequences. + /// If is asynchronous, consider using . /// /// /// A function to test whether an item in the input sequence should be included in the count. /// The input task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence is null. val lengthBy: predicate: ('T -> bool) -> source: taskSeq<'T> -> Task /// /// Returns the length of the sequence of all items for which the returns true. /// This operation requires the whole sequence to be evaluated and should not be used on potentially infinite sequences. - /// If does not need to be asynchronous, consider using . + /// If is synchronous, consider using . /// /// /// A function to test whether an item in the input sequence should be included in the count. /// The input task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence is null. val lengthByAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> Task /// @@ -139,7 +139,7 @@ module TaskSeq = /// /// The input task-sequence-of-task-sequences. /// The resulting task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence of task sequences is null. val concat: sources: taskSeq<#taskSeq<'T>> -> taskSeq<'T> /// @@ -150,7 +150,7 @@ module TaskSeq = /// The first input task sequence. /// The second input task sequence. /// The resulting task sequence. - /// Thrown when either of the input sequences is null. + /// Thrown when either of the input task sequences is null. val append: source1: taskSeq<'T> -> source2: taskSeq<'T> -> taskSeq<'T> /// @@ -279,6 +279,7 @@ module TaskSeq = /// /// The input resize array. /// The resulting task sequence. + /// Thrown when the input resize array is null. val ofResizeArray: source: ResizeArray<'T> -> taskSeq<'T> /// @@ -365,7 +366,7 @@ module TaskSeq = /// /// The input task sequence. /// The resulting task sequence. - /// Thrown when the input sequence is null. + /// Thrown when the input task sequence is null. val box: source: taskSeq<'T> -> taskSeq /// @@ -374,7 +375,8 @@ module TaskSeq = /// /// /// The input task sequence. - /// Thrown when the input sequence is null. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. /// Thrown when the function is unable to cast an item to the target type. val unbox<'U when 'U: struct> : source: taskSeq -> taskSeq<'U> @@ -384,7 +386,8 @@ module TaskSeq = /// /// /// The input task sequence. - /// Thrown when the input sequence is null. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. /// Thrown when the function is unable to cast an item to the target type. val cast: source: taskSeq -> taskSeq<'U> @@ -395,6 +398,7 @@ module TaskSeq = /// /// A function to apply to each element of the task sequence. /// The input task sequence. + /// A . /// Thrown when the input sequence is null. val iter: action: ('T -> unit) -> source: taskSeq<'T> -> Task @@ -406,7 +410,8 @@ module TaskSeq = /// /// A function to apply to each element of the task sequence that can also access the current index. /// The input task sequence. - /// Thrown when the input sequence is null. + /// A . + /// Thrown when the input task sequence is null. val iteri: action: (int -> 'T -> unit) -> source: taskSeq<'T> -> Task /// @@ -416,7 +421,8 @@ module TaskSeq = /// /// An asynchronous function to apply to each element of the task sequence. /// The input task sequence. - /// Thrown when the input sequence is null. + /// A . + /// Thrown when the input task sequence is null. val iterAsync: action: ('T -> #Task) -> source: taskSeq<'T> -> Task /// @@ -427,6 +433,7 @@ module TaskSeq = /// /// An asynchronous function to apply to each element of the task sequence that can also access the current index. /// The input task sequence. + /// A . /// Thrown when the input sequence is null. val iteriAsync: action: (int -> 'T -> #Task) -> source: taskSeq<'T> -> Task @@ -565,7 +572,7 @@ module TaskSeq = /// /// /// The input task sequence. - /// The first element of the task sequence, or None. + /// The first element of the task sequence, or . /// Thrown when the input task sequence is null. val tryHead: source: taskSeq<'T> -> Task<'T option> @@ -576,7 +583,7 @@ module TaskSeq = /// The input task sequence. /// The first element of the task sequence. /// Thrown when the input task sequence is null. - /// Thrown when the sequence is empty. + /// Thrown when the task sequence is empty. val head: source: taskSeq<'T> -> Task<'T> /// @@ -585,7 +592,7 @@ module TaskSeq = /// /// /// The input task sequence. - /// The input task sequence minus the first element, or None. + /// The input task sequence minus the first element, or . /// Thrown when the input task sequence is null. val tryTail: source: taskSeq<'T> -> Task option> @@ -596,7 +603,7 @@ module TaskSeq = /// The input task sequence. /// The input task sequence minus the first element. /// Thrown when the input task sequence is null. - /// Thrown when the sequence is empty. + /// Thrown when the task sequence is empty. val tail: source: taskSeq<'T> -> Task> /// @@ -616,7 +623,7 @@ module TaskSeq = /// The input task sequence. /// The last element of the task sequence. /// Thrown when the input task sequence is null. - /// Thrown when the sequence is empty. + /// Thrown when the task sequence is empty. val last: source: taskSeq<'T> -> Task<'T> /// @@ -641,10 +648,7 @@ module TaskSeq = /// The input task sequence. /// The nth element of the task sequence. /// Thrown when the input task sequence is null. - /// - /// Thrown when the sequence has insufficient length or - /// is negative. - /// + /// Thrown when the sequence has insufficient length or is negative. val item: index: int -> source: taskSeq<'T> -> Task<'T> /// @@ -653,7 +657,7 @@ module TaskSeq = /// /// /// The input task sequence. - /// The only element of the singleton task sequence, or None. + /// The only element of the singleton task sequence, or . /// Thrown when the input task sequence is null. val tryExactlyOne: source: taskSeq<'T> -> Task<'T option> @@ -662,231 +666,325 @@ module TaskSeq = /// /// /// The input task sequence. - /// The only element of the singleton task sequence, or None. + /// The only element of the singleton task sequence, or . /// Thrown when the input task sequence is null. - /// Thrown when the input sequence does not contain precisely one element. + /// Thrown when the input task sequence does not contain precisely one element. val exactlyOne: source: taskSeq<'T> -> Task<'T> /// /// Applies the given function to each element of the task sequence. Returns - /// a sequence comprised of the results "x" for each element where - /// the function returns . + /// a sequence comprised of the results where the function returns . /// If is asynchronous, consider using . /// + /// + /// A function to transform items of type into options of type . + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val choose: chooser: ('T -> 'U option) -> source: taskSeq<'T> -> taskSeq<'U> /// - /// Applies the given asynchronous function to each element of the task sequence. Returns - /// a sequence comprised of the results "x" for each element where - /// the function returns . - /// If does not need to be asynchronous, consider using . + /// Applies the given asynchronous function to each element of the task sequence. + /// Returns a sequence comprised of the results where the function returns a result + /// of . + /// If is synchronous, consider using . /// + /// + /// An asynchronous function to transform items of type into options of type . + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val chooseAsync: chooser: ('T -> #Task<'U option>) -> source: taskSeq<'T> -> taskSeq<'U> /// /// Returns a new collection containing only the elements of the collection - /// for which the given function returns . + /// for which the given function returns . /// If is asynchronous, consider using . /// + /// + /// A function to test whether an item in the input sequence should be included in the output or not. + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val filter: predicate: ('T -> bool) -> source: taskSeq<'T> -> taskSeq<'T> /// - /// Yields items from the source while the function returns . - /// The first result concludes consumption of the source. + /// Returns a new collection containing only the elements of the collection + /// for which the given function returns . + /// If is synchronous, consider using . + /// + /// + /// An asynchronous function to test whether an item in the input sequence should be included in the output or not. + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. + val filterAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> taskSeq<'T> + + /// + /// Returns a sequence that, when iterated, yields elements of the underlying sequence while the + /// given function returns , and then returns no further elements. + /// The first element where the predicate returns is not included in the resulting sequence + /// (see also ). /// If is asynchronous, consider using . /// + /// + /// A function that evaluates to false when no more items should be returned. + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val takeWhile: predicate: ('T -> bool) -> source: taskSeq<'T> -> taskSeq<'T> /// - /// Yields items from the source while the asynchronous function returns . - /// The first result concludes consumption of the source. - /// If does not need to be asynchronous, consider using . + /// Returns a sequence that, when iterated, yields elements of the underlying sequence while the + /// given asynchronous function returns , and then returns no further elements. + /// The first element where the predicate returns is not included in the resulting sequence + /// (see also ). + /// If is synchronous, consider using . /// + /// + /// An asynchronous function that evaluates to false when no more items should be returned. + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val takeWhileAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> taskSeq<'T> /// - /// Yields items from the source while the function returns . - /// The first result concludes consumption of the source, but is included in the result. + /// Returns a sequence that, when iterated, yields elements of the underlying sequence until the given + /// function returns , returns that element + /// and then returns no further elements (see also ). This function returns + /// at least one element of a non-empty sequence, or the empty task sequence if the input is empty. /// If is asynchronous, consider using . - /// If the final item is not desired, consider using . /// + /// + /// A function that evaluates to false when no more items should be returned. + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val takeWhileInclusive: predicate: ('T -> bool) -> source: taskSeq<'T> -> taskSeq<'T> /// - /// Yields items from the source while the asynchronous function returns . - /// The first result concludes consumption of the source, but is included in the result. - /// If does not need to be asynchronous, consider using . - /// If the final item is not desired, consider using . + /// Returns a sequence that, when iterated, yields elements of the underlying sequence until the given + /// asynchronous function returns , returns that element + /// and then returns no further elements (see also ). This function returns + /// at least one element of a non-empty sequence, or the empty task sequence if the input is empty. + /// If is synchronous, consider using . /// + /// + /// An asynchronous function that evaluates to false when no more items should be returned. + /// The input task sequence. + /// The resulting task sequence. + /// Thrown when the input task sequence is null. val takeWhileInclusiveAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> taskSeq<'T> /// - /// Returns a new collection containing only the elements of the collection - /// for which the given asynchronous function returns . - /// If does not need to be asynchronous, consider using . - /// - val filterAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> taskSeq<'T> - - /// - /// Applies the given function to successive elements of the task sequence - /// in , returning the first result where the function returns . + /// Applies the given function to successive elements, returning the first result where + /// the function returns . /// If is asynchronous, consider using . /// + /// A function to transform items of type into options of type . + /// The input task sequence. + /// The chosen element or . + /// Thrown when the input task sequence is null. val tryPick: chooser: ('T -> 'U option) -> source: taskSeq<'T> -> Task<'U option> /// - /// Applies the given asynchronous function to successive elements of the task sequence - /// in , returning the first result where the function returns . - /// If does not need to be asynchronous, consider using . + /// Applies the given asynchronous function to successive elements, returning the first result where + /// the function returns . + /// If is synchronous, consider using . /// + /// An asynchronous function to transform items of type into options of type . + /// The input task sequence. + /// The chosen element or . + /// Thrown when the input task sequence is null. val tryPickAsync: chooser: ('T -> #Task<'U option>) -> source: taskSeq<'T> -> Task<'U option> /// - /// Returns the first element of the task sequence in for which the given function - /// returns . Returns if no such element exists. + /// Returns the first element for which the given function returns + /// . Returns if no such element exists. /// If is asynchronous, consider using . /// + /// + /// A function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The found element or . + /// Thrown when the input task sequence is null. val tryFind: predicate: ('T -> bool) -> source: taskSeq<'T> -> Task<'T option> /// - /// Returns the first element of the task sequence in for which the given asynchronous function - /// returns . Returns if no such element exists. - /// If does not need to be asynchronous, consider using . + /// Returns the first element for which the given asynchronous function returns + /// . Returns if no such element exists. + /// If is synchronous, consider using . /// + /// + /// An asynchronous function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The found element or . + /// Thrown when the input task sequence is null. val tryFindAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> Task<'T option> /// - /// Returns the index, starting from zero, of the task sequence in for which the given function - /// returns . Returns if no such element exists. + /// Returns the index, starting from zero for which the given function returns + /// . Returns if no such element exists. /// If is asynchronous, consider using . /// + /// + /// A function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The found element or . + /// Thrown when the input task sequence is null. val tryFindIndex: predicate: ('T -> bool) -> source: taskSeq<'T> -> Task /// - /// Returns the index, starting from zero, of the task sequence in for which the given asynchronous function - /// returns . Returns if no such element exists. - /// If does not need to be asynchronous, consider using . + /// Returns the index, starting from zero for which the given asynchronous function returns + /// . Returns if no such element exists. + /// If is synchronous, consider using . /// + /// + /// An asynchronous function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The found element or . + /// Thrown when the input task sequence is null. val tryFindIndexAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> Task /// - /// Applies the given function to successive elements of the task sequence - /// in , returning the first result where the function returns . + /// Applies the given function to successive elements, returning the first result where + /// the function returns . Throws an exception if none is found. /// If is asynchronous, consider using . - /// Thrown when every item of the sequence - /// evaluates to when the given function is applied. /// + /// + /// A function to transform items of type into options of type . + /// The input sequence. + /// The selected element. + /// Thrown when the input task sequence is null. + /// Thrown when every item of the sequence evaluates to when the given function is applied. val pick: chooser: ('T -> 'U option) -> source: taskSeq<'T> -> Task<'U> /// - /// Applies the given asynchronous function to successive elements of the task sequence - /// in , returning the first result where the function returns . - /// If does not need to be asynchronous, consider using . - /// Thrown when every item of the sequence - /// evaluates to when the given function is applied. + /// Applies the given asynchronous function to successive elements, returning the first result where + /// the function returns . Throws an exception if none is found. + /// If is synchronous, consider using . /// + /// + /// An asynchronous function to transform items of type into options of type . + /// The input sequence. + /// The selected element. + /// Thrown when the input task sequence is null. + /// Thrown when every item of the sequence evaluates to when the given function is applied. val pickAsync: chooser: ('T -> #Task<'U option>) -> source: taskSeq<'T> -> Task<'U> /// - /// Returns the first element of the task sequence in for which the given function - /// returns . + /// Returns the first element for which the given function returns . + /// Throws an exception if none is found. /// If is asynchronous, consider using . /// - /// Thrown if no element returns when - /// evaluated by the function. + /// + /// A function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The first element for which the predicate returns . + /// Thrown when the input task sequence is null. + /// Thrown if no element returns when evaluated by the function. val find: predicate: ('T -> bool) -> source: taskSeq<'T> -> Task<'T> /// - /// Returns the first element of the task sequence in for which the given - /// asynchronous function returns . - /// If does not need to be asynchronous, consider using . + /// Returns the first element for which the given asynchronous function returns . + /// Throws an exception if none is found. + /// If is synchronous, consider using . /// - /// Thrown if no element returns when - /// evaluated by the function. + /// + /// An asynchronous function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The first element for which the predicate returns . + /// Thrown when the input task sequence is null. + /// Thrown if no element returns when evaluated by the function. val findAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> Task<'T> /// - /// Returns the index, starting from zero, of the first element of the task sequence in for which - /// the given function returns . + /// Returns the index, starting from zero, of the first element for which the given function + /// returns . /// If is asynchronous, consider using . /// - /// Thrown if no element returns when - /// evaluated by the function. + /// + /// A function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The index for which the predicate returns . + /// Thrown when the input task sequence is null. + /// Thrown if no element returns when evaluated by the function. val findIndex: predicate: ('T -> bool) -> source: taskSeq<'T> -> Task /// - /// Returns the index, starting from zero, of the task sequence in for which the given - /// asynchronous function returns . - /// If does not need to be asynchronous, consider using . + /// Returns the index, starting from zero, of the first element for which the given function + /// returns . + /// If is synchronous, consider using . /// /// - /// Thrown if no element returns when - /// evaluated by the function. + /// An asynchronous function that evaluates to a when given an item in the sequence. + /// The input task sequence. + /// The index for which the predicate returns . + /// Thrown when the input task sequence is null. + /// Thrown if no element returns when evaluated by the function. val findIndexAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> Task /// /// Tests if the sequence contains the specified element. Returns /// if contains the specified element; - /// otherwise. + /// otherwise. The input task sequence is only evaluated until the first element that matches the value. /// /// /// The value to locate in the input sequence. - /// The input sequence. - /// True if the input sequence contains the specified element; false otherwise. - /// Thrown when the input sequence is null. + /// The input task sequence. + /// if the input sequence contains the specified element; otherwise. + /// Thrown when the input task sequence is null. val contains<'T when 'T: equality> : value: 'T -> source: taskSeq<'T> -> Task /// - /// Tests if any element of the task sequence in satisfies - /// the given . - /// The function is applied to the elements of the input sequence. If any application - /// returns then the overall result is and no further elements are evaluated and tested. + /// Tests if any element of the task sequence in satisfies the given . The function + /// is applied to the elements of the input task sequence. If any application returns then the overall result + /// is and no further elements are evaluated and tested. /// Otherwise, is returned. /// /// /// A function to test each item of the input sequence. - /// The input sequence. /// - /// True if any result from the predicate is true; false otherwise. /// - /// Thrown when the input sequence is null. + /// The input task sequence. + /// if any result from the predicate is true; otherwise. + /// Thrown when the input task sequence is null. val exists: predicate: ('T -> bool) -> source: taskSeq<'T> -> Task /// - /// Tests if any element of the task sequence in satisfies - /// the given async . - /// The function is applied to the elements of the input sequence. If any application - /// returns then the overall result is and no further elements are evaluated and tested. + /// Tests if any element of the task sequence in satisfies the given asynchronous . + /// The function is applied to the elements of the input task sequence. If any application returns then the overall result + /// is and no further elements are evaluated and tested. /// Otherwise, is returned. /// /// /// A function to test each item of the input sequence. - /// The input sequence. /// - /// True if any result from the predicate is true; false otherwise. /// - /// Thrown when the input sequence is null. + /// The input task sequence. + /// if any result from the predicate is true; otherwise. + /// Thrown when the input task sequence is null. val existsAsync: predicate: ('T -> #Task) -> source: taskSeq<'T> -> Task /// /// Returns a new task sequence with the distinct elements of the second task sequence which do not appear in the - /// , using generic hash and equality comparisons to compare values. + /// sequence, using generic hash and equality comparisons to compare values. /// /// /// /// Note that this function returns a task sequence that digests the whole of the first input task sequence as soon as - /// the result sequence first gets awaited or iterated. As a result this function should not be used with + /// the resulting task sequence first gets awaited or iterated. As a result this function should not be used with /// large or infinite sequences in the first parameter. The function makes no assumption on the ordering of the first input /// sequence. /// /// /// A task sequence whose elements that also occur in the second sequence will cause those elements to be removed from the returned sequence. - /// A sequence whose elements that are not also in first will be returned. + /// The input task sequence whose elements that are not also in the first will be returned. /// A sequence that contains the set difference of the elements of two sequences. /// - /// Thrown when either of the two input sequences is null. + /// Thrown when either of the two input task sequences is null. val except<'T when 'T: equality> : itemsToExclude: taskSeq<'T> -> source: taskSeq<'T> -> taskSeq<'T> /// /// Returns a new task sequence with the distinct elements of the second task sequence which do not appear in the - /// , using generic hash and equality comparisons to compare values. + /// sequence, using generic hash and equality comparisons to compare values. /// /// /// @@ -897,29 +995,46 @@ module TaskSeq = /// /// /// A task sequence whose elements that also occur in the second sequence will cause those elements to be removed from the returned sequence. - /// A sequence whose elements that are not also in first will be returned. + /// The input task sequence whose elements that are not also in first will be returned. /// A sequence that contains the set difference of the elements of two sequences. /// - /// Thrown when either of the two input sequences is null. + /// Thrown when either of the two input task sequences is null. val exceptOfSeq<'T when 'T: equality> : itemsToExclude: seq<'T> -> source: taskSeq<'T> -> taskSeq<'T> /// - /// Zips two task sequences, returning a taskSeq of the tuples of each sequence, in order. May raise ArgumentException - /// if the sequences are or unequal length. + /// Combines the two task sequences into a new task sequence of pairs. The two sequences need not have equal lengths: + /// when one sequence is exhausted any remaining elements in the other sequence are ignored. /// - /// The sequences have different lengths. + /// + /// The first input task sequence. + /// The second input task sequence. + /// Thrown when either of the two input task sequences is null. val zip: source1: taskSeq<'T> -> source2: taskSeq<'U> -> taskSeq<'T * 'U> /// - /// Applies the function to each element in the task sequence, - /// threading an accumulator argument of type through the computation. + /// Applies the function to each element in the task sequence, threading an accumulator + /// argument of type through the computation. If the input function is and the elements are + /// then computes . /// If the accumulator function is asynchronous, consider using . /// + /// + /// A function that updates the state with each element from the sequence. + /// The initial state. + /// The input sequence. + /// The state object after the folding function is applied to each element of the sequence. + /// Thrown when the input task sequence is null. val fold: folder: ('State -> 'T -> 'State) -> state: 'State -> source: taskSeq<'T> -> Task<'State> /// - /// Applies the asynchronous function to each element in the task sequence, - /// threading an accumulator argument of type through the computation. - /// If the accumulator function does not need to be asynchronous, consider using . + /// Applies the asynchronous function to each element in the task sequence, threading an accumulator + /// argument of type through the computation. If the input function is and the elements are + /// then computes . + /// If the accumulator function is synchronous, consider using . /// + /// + /// A function that updates the state with each element from the sequence. + /// The initial state. + /// The input sequence. + /// The state object after the folding function is applied to each element of the sequence. + /// Thrown when the input task sequence is null. val foldAsync: folder: ('State -> 'T -> #Task<'State>) -> state: 'State -> source: taskSeq<'T> -> Task<'State>