Skip to content

Commit e314f34

Browse files
committed
cleanup names
1 parent 6a04b4a commit e314f34

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/FSharp.Control.AsyncSeq/AsyncSeq.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ module AsyncSeq =
235235
//
236236
// because F# translates body as Bind(something, fun () -> Return())
237237
member x.Return _ = empty
238-
member x.YieldFrom(s) = s
238+
member x.YieldFrom(s:AsyncSeq<'T>) = s
239239
member x.Zero () = empty
240240
member x.Bind (inp:Async<'T>, body : 'T -> AsyncSeq<'U>) : AsyncSeq<'U> =
241241
bindAsync body inp
242242
member x.Combine (seq1:AsyncSeq<'T>,seq2:AsyncSeq<'T>) =
243243
append seq1 seq2
244-
member x.While (gd, seq:AsyncSeq<'T>) =
245-
if gd() then x.Combine(seq,x.Delay(fun () -> x.While (gd, seq))) else x.Zero()
244+
member x.While (guard, body:AsyncSeq<'T>) =
245+
if guard() then x.Combine(body,x.Delay(fun () -> x.While (guard, body))) else x.Zero()
246246
member x.Delay (f:unit -> AsyncSeq<'T>) =
247247
delay f
248248

src/FSharp.Control.AsyncSeq/AsyncSeq.fsi

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module AsyncSeq =
6161
new : unit -> AsyncSeqBuilder
6262

6363
/// Implements binding for the asyncSeq computation builder.
64-
member Bind : inpredicate:Async<'T> * body:('T -> AsyncSeq<'U>) -> AsyncSeq<'U>
64+
member Bind : source:Async<'T> * body:('T -> AsyncSeq<'U>) -> AsyncSeq<'U>
6565

6666
/// Implements sequential composition for the asyncSeq computation builder.
6767
member Combine : seq1:AsyncSeq<'T> * seq2:AsyncSeq<'T> -> AsyncSeq<'T>
@@ -71,14 +71,14 @@ module AsyncSeq =
7171

7272
/// For loop that iterates over a synchronous sequence (and generates
7373
/// all elements generated by the asynchronous body)
74-
member For : seq:seq<'T> * action:('T -> AsyncSeq<'TResult>) -> AsyncSeq<'TResult>
74+
member For : source:seq<'T> * action:('T -> AsyncSeq<'TResult>) -> AsyncSeq<'TResult>
7575

7676
/// Implements "for" loops for the asyncSeq computation builder.
7777
///
7878
/// Asynchronous for loop - for all elements from the input sequence,
7979
/// generate all elements produced by the body (asynchronously). See
8080
/// also the AsyncSeq.collect function.
81-
member For : seq:AsyncSeq<'T> * action:('T -> AsyncSeq<'TResult>) -> AsyncSeq<'TResult>
81+
member For : source:AsyncSeq<'T> * action:('T -> AsyncSeq<'TResult>) -> AsyncSeq<'TResult>
8282

8383
/// Implements "return" for the asyncSeq computation builder.
8484
member Return : 'unit -> AsyncSeq<'T>
@@ -93,13 +93,13 @@ module AsyncSeq =
9393
member Using : resource:'T * binder:('T -> AsyncSeq<'U>) -> AsyncSeq<'U> when 'T :> System.IDisposable
9494

9595
/// Implements "while" for the asyncSeq computation builder.
96-
member While : gd:(unit -> bool) * seq:AsyncSeq<'T> -> AsyncSeq<'T>
96+
member While : guard:(unit -> bool) * body:AsyncSeq<'T> -> AsyncSeq<'T>
9797

9898
/// Implements "yield" for the asyncSeq computation builder.
99-
member Yield : v:'T -> AsyncSeq<'T>
99+
member Yield : value:'T -> AsyncSeq<'T>
100100

101101
/// Implements "yield!" for the asyncSeq computation builder.
102-
member YieldFrom : source:'U -> 'U
102+
member YieldFrom : source:AsyncSeq<'T> -> AsyncSeq<'T>
103103

104104
/// Implements empty for the asyncSeq computation builder.
105105
member Zero : unit -> AsyncSeq<'T>
@@ -215,7 +215,7 @@ module AsyncSeq =
215215
/// to the observable, a new copy of asynchronous sequence is started and is
216216
/// sequentially iterated over (at the maximal possible speed). Disposing of the
217217
/// observer cancels the iteration over asynchronous sequence.
218-
val toObservable : aseq:AsyncSeq<'T> -> System.IObservable<'T>
218+
val toObservable : source:AsyncSeq<'T> -> System.IObservable<'T>
219219

220220
/// Converts asynchronous sequence to a synchronous blocking sequence.
221221
/// The elements of the asynchronous sequence are consumed lazily.
@@ -237,12 +237,12 @@ module AsyncSeq =
237237
/// Combines two asynchronous sequences using the specified function.
238238
/// The values from sequences are retrieved in parallel.
239239
/// The resulting sequence stops when either of the argument sequences stop.
240-
val zipWithAsync : z:('T1 -> 'T2 -> Async<'U>) -> a:AsyncSeq<'T1> -> b:AsyncSeq<'T2> -> AsyncSeq<'U>
240+
val zipWithAsync : mapping:('T1 -> 'T2 -> Async<'U>) -> source1:AsyncSeq<'T1> -> source2:AsyncSeq<'T2> -> AsyncSeq<'U>
241241

242242
/// Combines two asynchronous sequences using the specified function.
243243
/// The values from sequences are retrieved in parallel.
244244
/// The resulting sequence stops when either of the argument sequences stop.
245-
val inline zipWith : z:('T1 -> 'T2 -> 'U) -> a:AsyncSeq<'T1> -> b:AsyncSeq<'T2> -> AsyncSeq<'U>
245+
val inline zipWith : mapping:('T1 -> 'T2 -> 'U) -> source1:AsyncSeq<'T1> -> source2:AsyncSeq<'T2> -> AsyncSeq<'U>
246246

247247
/// Builds a new asynchronous sequence whose elements are generated by
248248
/// applying the specified function to all elements of the input sequence.
@@ -323,26 +323,26 @@ module AsyncSeq =
323323

324324
/// Interleaves two async sequences into a resulting sequence. The provided
325325
/// sequences are consumed in lock-step.
326-
val interleave : firstSeq:AsyncSeq<'T1> -> secondSeq:AsyncSeq<'T2> -> AsyncSeq<Choice<'T1,'T2>>
326+
val interleave : source1:AsyncSeq<'T1> -> source2:AsyncSeq<'T2> -> AsyncSeq<Choice<'T1,'T2>>
327327

328328
/// Buffer items from the async sequence into buffers of a specified size.
329329
/// The last buffer returned may be less than the specified buffer size.
330330
val bufferByCount : bufferSize:int -> source:AsyncSeq<'T> -> AsyncSeq<'T []>
331331

332332
/// Merges two async sequences into an async sequence non-deterministically.
333-
val mergeChoice: firstSeq:AsyncSeq<'T1> -> secondSeq:AsyncSeq<'T2> -> AsyncSeq<Choice<'T1,'T2>>
333+
val mergeChoice: source1:AsyncSeq<'T1> -> source2:AsyncSeq<'T2> -> AsyncSeq<Choice<'T1,'T2>>
334334

335335
/// Merges two async sequences of the same typee into an async sequence non-deterministically.
336-
val merge: firstSeq:AsyncSeq<'T> -> secondSeq:AsyncSeq<'T> -> AsyncSeq<'T>
336+
val merge: source1:AsyncSeq<'T> -> source2:AsyncSeq<'T> -> AsyncSeq<'T>
337337

338338
/// Merges all specified async sequences into an async sequence non-deterministically.
339-
val mergeAll : ss:AsyncSeq<'T> list -> AsyncSeq<'T>
339+
val mergeAll : sources:AsyncSeq<'T> list -> AsyncSeq<'T>
340340

341341
/// Returns an async sequence which contains no contiguous duplicate elements based on the specified comparison function.
342-
val distinctUntilChangedWithAsync : f:('T -> 'T -> Async<bool>) -> source:AsyncSeq<'T> -> AsyncSeq<'T>
342+
val distinctUntilChangedWithAsync : mapping:('T -> 'T -> Async<bool>) -> source:AsyncSeq<'T> -> AsyncSeq<'T>
343343

344344
/// Returns an async sequence which contains no contiguous duplicate elements based on the specified comparison function.
345-
val distinctUntilChangedWith : f:('T -> 'T -> bool) -> source:AsyncSeq<'T> -> AsyncSeq<'T>
345+
val distinctUntilChangedWith : mapping:('T -> 'T -> bool) -> source:AsyncSeq<'T> -> AsyncSeq<'T>
346346

347347
/// Returns an async sequence which contains no contiguous duplicate elements.
348348
val distinctUntilChanged : source:AsyncSeq<'T> -> AsyncSeq<'T> when 'T : equality

0 commit comments

Comments
 (0)