And we have a function called getCustomerByEmail that retrieves a Customer by email address asynchronously from some external source -- a database, a web service, etc:
// string -> Async<Customer>letgetCustomerByEmail email :Async<Customer>=async{return{ Id =1; Email ="test@test.com"}// return a constant for simplicity}
If we have a value of type string option and want to call the getCustomerByEmail function, we can achieve it using the traverseAsync function as below: