Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



Isn't that a synchronous call?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: