Skip to content

Commit

Permalink
+ Test
Browse files Browse the repository at this point in the history
  • Loading branch information
gusty committed Oct 6, 2024
1 parent daed63d commit d2d0f92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/FSharpPlus.Tests/SeqT.fs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ module BasicTests =
let y3 = SeqT.run x3 |> extract |> toList
CollectionAssert.AreEqual (y3, [("0", 0, 0); ("1", 10, 1); ("2", 20, 2)])

[<Test>]
let picks () =
let infinite: SeqT<Async<_>, _> = SeqT.unfold (fun x -> Some (x, x + 1)) 0
let five = SeqT.find ((<) 4) infinite |> Async.RunSynchronously
Assert.AreEqual (5, five)


// Compile tests
let binds () =
let res1 = SeqT [|seq [1..4] |] >>= fun x -> SeqT [|seq [x * 2] |]
Expand Down

0 comments on commit d2d0f92

Please sign in to comment.