Namespace: FsToolkit.ErrorHandling
Function Signature:
('a -> 'b) -> Async<Result<'a option, 'c>>
-> Async<Result<'b option, 'c>>


Note: Many use-cases requiring map operations can also be solved using the asyncResultOption computation expression.

Example 1

Given the function
getUserById : UserId -> Async<Result<User option, exn>>
Then using the we can get the name of the user like this:
// Async<Result<PersonName option>, exn>
getUserById sampleUserId
|> (fun user -> user.Name)
Last modified 2yr ago