@@ -21,12 +21,7 @@ module EmptySeq =
2121 <| fun () -> TaskSeq.foldWhile ( fun _ _ -> true ) ( fun _ item -> item + 1 ) 0 null
2222
2323 assertNullArg
24- <| fun () ->
25- TaskSeq.foldWhileAsync
26- ( fun _ _ -> Task.fromResult true )
27- ( fun _ item -> Task.fromResult ( item + 1 ))
28- 0
29- null
24+ <| fun () -> TaskSeq.foldWhileAsync ( fun _ _ -> Task.fromResult true ) ( fun _ item -> Task.fromResult ( item + 1 )) 0 null
3025
3126 [<Theory; ClassData( typeof< TestEmptyVariants>) >]
3227 let ``TaskSeq - foldWhile returns initial state when empty`` variant = task {
@@ -41,10 +36,7 @@ module EmptySeq =
4136 let ``TaskSeq - foldWhileAsync returns initial state when empty`` variant = task {
4237 let! result =
4338 Gen.getEmptyVariant variant
44- |> TaskSeq.foldWhileAsync
45- ( fun _ _ -> Task.fromResult true )
46- ( fun _ item -> Task.fromResult ( item + 1 ))
47- - 1
39+ |> TaskSeq.foldWhileAsync ( fun _ _ -> Task.fromResult true ) ( fun _ item -> Task.fromResult ( item + 1 )) - 1
4840
4941 result |> should equal - 1
5042 }
@@ -105,10 +97,7 @@ module Functionality =
10597 let ``TaskSeq - foldWhileAsync with always - true predicate behaves like foldAsync`` () = task {
10698 let! result =
10799 TaskSeq.ofList [ 1 ; 2 ; 3 ; 4 ; 5 ]
108- |> TaskSeq.foldWhileAsync
109- ( fun _ _ -> Task.fromResult true )
110- ( fun acc item -> Task.fromResult ( acc + item))
111- 0
100+ |> TaskSeq.foldWhileAsync ( fun _ _ -> Task.fromResult true ) ( fun acc item -> Task.fromResult ( acc + item)) 0
112101
113102 result |> should equal 15
114103 }
@@ -126,10 +115,7 @@ module Functionality =
126115 let ``TaskSeq - foldWhileAsync is left - associative like foldAsync`` () = task {
127116 let! result =
128117 TaskSeq.ofList [ " b" ; " c" ; " d" ]
129- |> TaskSeq.foldWhileAsync
130- ( fun _ _ -> Task.fromResult true )
131- ( fun acc item -> Task.fromResult ( acc + item))
132- " a"
118+ |> TaskSeq.foldWhileAsync ( fun _ _ -> Task.fromResult true ) ( fun acc item -> Task.fromResult ( acc + item)) " a"
133119
134120 result |> should equal " abcd"
135121 }
@@ -257,10 +243,7 @@ module Halt =
257243
258244 let! _ =
259245 source
260- |> TaskSeq.foldWhileAsync
261- ( fun _ item -> Task.fromResult ( item < 3 ))
262- ( fun acc item -> Task.fromResult ( acc + item))
263- 0
246+ |> TaskSeq.foldWhileAsync ( fun _ item -> Task.fromResult ( item < 3 )) ( fun acc item -> Task.fromResult ( acc + item)) 0
264247
265248 pulled |> should equal 3
266249 }
0 commit comments