diff --git a/docs/fsharp.md b/docs/fsharp.md index 008cb156fc..942204649e 100644 --- a/docs/fsharp.md +++ b/docs/fsharp.md @@ -39,6 +39,19 @@ let MyTest () = snippet source | anchor +Tasks can also be used directly via a `task` computation expression builder, such as the ones included in [Ply](https://github.com/crowded/ply), [TaskBuilder.fs](https://github.com/rspeele/TaskBuilder.fs), or (starting with F# 6.0) FSharp.Core: + + + +```fs +[] +let MyTaskTest () = + task { + do! Verifier.Verify(15) + } +``` +snippet source | anchor + ## Full tests @@ -63,6 +76,12 @@ let MyTest () = .ToTask() |> Async.AwaitTask } +[] +let MyTaskTest () = + task { + do! Verifier.Verify(15) + } + [] let WithFluentSetting () = async { @@ -72,5 +91,5 @@ let WithFluentSetting () = } do () ``` -snippet source | anchor +snippet source | anchor