The type of WebPart you are looking for comes from Suave . You can learn more about this at https://suave.io/async.html , but I will summarize. You are right: this is a type of function. In particular, it is a function that takes a Context (which in Suave is a combination of an HTTP request record and a response record) and returns a Context option asynchronously. That is, since some queries may fail, the function has the ability to return None instead of a value. And since some requests can take a long time, all requests are treated as returned asynchronously, which is why Async .
To bind the two queries together, Suave provides the binding operator >=> , so you do not have to go through the input template pattern async { match result1 with None -> None | Some x -> return! request2 x async { match result1 with None -> None | Some x -> return! request2 x async { match result1 with None -> None | Some x -> return! request2 x all the time; instead, you can simply type request1 >=> request2 for the same effect.
If you need more help, and reading Suave's documentation did not provide you with the help you need, let us know and we will try to explain further.
source share