You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/FSharpPlus/Extensions/Choice.fs
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,21 +24,27 @@ module Choice =
24
24
letmap(mapping:'T->'U)(source:Choice<'T,'T2>)=match source with Choice1Of2 v -> Choice1Of2 (mapping v)| Choice2Of2 e -> Choice2Of2 e
25
25
26
26
/// <summary>Creates a Choice value from a pair of Choice values, using a function to combine the Choice1Of2 values.</summary>
27
+
/// <param name="mapping">A function to apply to the Choice1Of2 values.</param>
27
28
/// <param name="x">The first Choice value.</param>
28
29
/// <param name="y">The second Choice value.</param>
29
30
///
30
31
/// <returns>The combined value, or the first Choice2Of2.</returns>
31
-
letmap2 f (x:Choice<'T,'Error>)(y:Choice<'U,'Error>):Choice<'V,'Error>=match x, y with Choice1Of2 a, Choice1Of2 b -> Choice1Of2 (f a b)| Choice2Of2 e,_|_, Choice2Of2 e -> Choice2Of2 e
0 commit comments