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 =
148148 let zip j1 j2 =
149149 Job.zip j1 j2
150150 |> 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)
151156
152157 /// Catches exceptions and maps them to the Error case using the provided function.
153158 let catch f x =
Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ module TaskResult =
143143 Task.zip x1 x2
144144 |> Task.map( fun ( r1 , r2 ) -> Result.zip r1 r2)
145145
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+
146151 /// Catches exceptions and maps them to the Error case using the provided function.
147152 let catch f x =
148153 x
Original file line number Diff line number Diff line change @@ -153,6 +153,11 @@ module AsyncResult =
153153 Async.zip x1 x2
154154 |> Async.map( fun ( r1 , r2 ) -> Result.zip r1 r2)
155155
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+
156161 /// Catches exceptions and maps them to the Error case using the provided function.
157162 let catch f x =
158163 x
You can’t perform that action at this time.
0 commit comments