Hacker News new | ask | show | jobs
by sasmithjr 223 days ago
You can write a helper method (or use FsToolkit.ErrorHandling[0]) to simplify the F# example to:

    let Foo () = getData() |> Task.map _.value
And it'll be easier to work with the .NET ecosystem if you use the task computation expression[1] over the async one.

[0]: https://github.com/demystifyfp/FsToolkit.ErrorHandling

[1]: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...

1 comments

Isn't that a synchronous call?