FsToolkit.ErrorHandling
Search…
README
Result
Option
ResultOption
map
map2
map3
apply
bind
ignore
Computation Expression
Operators
AsyncResult
TaskResult
JobResult
List
AsyncResultOption
Validation
Test
Powered By
GitBook
map
Namespace:
FsToolkit.ErrorHandling
Function Signature:
(
'a
->
'b
)
->
Result
<
'a option
,
'c
>
->
Result
<
'b option
,
'c
>
ResultOption.map
is the same as
Result.map Option.map
.
Example 1
Given the following functions:
getTweet
:
PostId
->
Result
<
Tweet option
,
_
>
remainingCharacters
:
Tweet
->
int
You can get the number of remaining characters as below:
getTweetByPostId somePostId
|>
ResultOption
.
map remainingCharacters
Previous
ResultOption
Next
map2
Last modified
9mo ago
Copy link