File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
FsToolkit.ErrorHandling.JobResult
FsToolkit.ErrorHandling.TaskResult Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,11 @@ module JobResult =
148
148
let zip j1 j2 =
149
149
Job.zip j1 j2
150
150
|> Job.map( fun ( r1 , r2 ) -> Result.zip r1 r2)
151
+
152
+ /// Takes two results and returns a tuple of the error pair
153
+ let zipError j1 j2 =
154
+ Job.zip j1 j2
155
+ |> Job.map( fun ( r1 , r2 ) -> Result.zipError r1 r2)
151
156
152
157
/// Catches exceptions and maps them to the Error case using the provided function.
153
158
let catch f x =
Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ module TaskResult =
143
143
Task.zip x1 x2
144
144
|> Task.map( fun ( r1 , r2 ) -> Result.zip r1 r2)
145
145
146
+ /// Takes two results and returns a tuple of the error pair
147
+ let zipError x1 x2 =
148
+ Task.zip x1 x2
149
+ |> Task.map( fun ( r1 , r2 ) -> Result.zipError r1 r2)
150
+
146
151
/// Catches exceptions and maps them to the Error case using the provided function.
147
152
let catch f x =
148
153
x
Original file line number Diff line number Diff line change @@ -153,6 +153,11 @@ module AsyncResult =
153
153
Async.zip x1 x2
154
154
|> Async.map( fun ( r1 , r2 ) -> Result.zip r1 r2)
155
155
156
+ /// Takes two results and returns a tuple of the error pair
157
+ let zipError x1 x2 =
158
+ Async.zip x1 x2
159
+ |> Async.map( fun ( r1 , r2 ) -> Result.zipError r1 r2)
160
+
156
161
/// Catches exceptions and maps them to the Error case using the provided function.
157
162
let catch f x =
158
163
x
You can’t perform that action at this time.
0 commit comments