Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/FSharpy.TaskSeq.Test/FSharpy.TaskSeq.Test.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
<Compile Include="TaskSeq.Empty.Tests.fs" />
<Compile Include="TaskSeq.ExactlyOne.Tests.fs" />
<Compile Include="TaskSeq.Filter.Tests.fs" />
<Compile Include="TaskSeq.FindIndex.Tests.fs" />
<Compile Include="TaskSeq.Find.Tests.fs" />
<Compile Include="TaskSeq.Fold.Tests.fs" />
<Compile Include="TaskSeq.Head.Tests.fs" />
<Compile Include="TaskSeq.Indexed.Tests.fs" />
<Compile Include="TaskSeq.IsEmpty.fs" />
<Compile Include="TaskSeq.Item.Tests.fs" />
<Compile Include="TaskSeq.Iter.Tests.fs" />
Expand Down
8 changes: 4 additions & 4 deletions src/FSharpy.TaskSeq.Test/TaskSeq.Find.Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ module SideEffects =
found |> should equal 3
i |> should equal 3 // only partial evaluation!

// find next item. We do get a new iterator, but mutable state is now starting at '3'
// find next item. We do get a new iterator, but mutable state is now starting at '3', so first item now returned is '4'.
let! found = ts |> TaskSeq.find ((=) 4)
found |> should equal 4
i |> should equal 4 // only partial evaluation!
Expand All @@ -226,7 +226,7 @@ module SideEffects =
found |> should equal 3
i |> should equal 3 // only partial evaluation!

// find next item. We do get a new iterator, but mutable state is now starting at '3'
// find next item. We do get a new iterator, but mutable state is now starting at '3', so first item now returned is '4'.
let! found = ts |> TaskSeq.findAsync (fun x -> task { return x = 4 })
found |> should equal 4
i |> should equal 4
Expand Down Expand Up @@ -360,7 +360,7 @@ module SideEffects =
found |> should equal (Some 3)
i |> should equal 3 // only partial evaluation!

// find next item. We do get a new iterator, but mutable state is now starting at '3'
// find next item. We do get a new iterator, but mutable state is now starting at '3', so first item now returned is '4'.
let! found = ts |> TaskSeq.tryFind ((=) 4)
found |> should equal (Some 4)
i |> should equal 4 // only partial evaluation!
Expand All @@ -380,7 +380,7 @@ module SideEffects =
found |> should equal (Some 3)
i |> should equal 3 // only partial evaluation!

// find next item. We do get a new iterator, but mutable state is now starting at '3'
// find next item. We do get a new iterator, but mutable state is now starting at '3', so first item now returned is '4'.
let! found = ts |> TaskSeq.tryFindAsync (fun x -> task { return x = 4 })
found |> should equal (Some 4)
i |> should equal 4
Expand Down
Loading