Operators
TaskResultOption Infix Operators
Namespace: FsToolkit.ErrorHandling.Operator.TaskResultOption
FsToolkit.ErrorHandling provides the standard infix operators for the map
(<!>
), apply
(<*>
), and bind
(>>=
) functions of the Result<Option<_>,_>
type.
Examples
Example 1
The TaskResultOption map2 example can be written using operators like this:
open FsToolkit.ErrorHandling.Operator.TaskResult
// Task<Result<UserTweet option, Exception>>
userTweet
<!> (getPostById samplePostId)
<*> (getUserById sampleUserId)
Last updated