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
static member inline ``<|>`` (x:Choice<_,_>,y ,[<Optional>]_mthd:Append )=match x, y with Choice1Of2 _,_-> x | Choice2Of2 x, Choice2Of2 y -> Choice2Of2 (Plus.Invoke x y)|_,_-> y
45
46
static member inline ``<|>`` (x:Either<_,_>,y ,[<Optional>]_mthd:Append )=match x with Left _-> y | xs -> xs
46
47
static member ``<|>`` (x:'T option ,y ,[<Optional>]_mthd:Append )=match x with None -> y | xs -> xs
48
+
static member ``<|>`` (x:'T voption ,y ,[<Optional>]_mthd:Append )=match x with ValueNone -> y | xs -> xs
47
49
static member ``<|>`` (x:'T list ,y ,[<Optional>]_mthd:Append )= x @ y
48
50
static member ``<|>`` (x:'T [],y ,[<Optional>]_mthd:Append )= Array.append x y
49
51
@@ -63,6 +65,9 @@ type IsAltLeftZero =
63
65
static member inlineIsAltLeftZero(_:ref<^t>when ^t:null and ^t:struct ,_mthd:Default1)=()
Copy file name to clipboardExpand all lines: src/FSharpPlus/Control/Applicative.fs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ type Apply =
32
32
#endif
33
33
static member ``<*>`` (f:Async<_>,x:Async<'T>,[<Optional>]_output:Async<'U>,[<Optional>]_mthd:Apply)= Async.apply f x : Async<'U>
34
34
static member ``<*>`` (f:option<_>,x:option<'T>,[<Optional>]_output:option<'U>,[<Optional>]_mthd:Apply)= Option.apply f x : option<'U>
35
+
static member ``<*>`` (f:voption<_>,x:voption<'T>,[<Optional>]_output:voption<'U>,[<Optional>]_mthd:Apply)= ValueOption.apply f x : voption<'U>
35
36
static member ``<*>`` (f:Result<_,'E>,x:Result<'T,'E>,[<Optional>]_output:Result<'b,'E>,[<Optional>]_mthd:Apply)= Result.apply f x : Result<'U,'E>
36
37
static member ``<*>`` (f:Choice<_,'E>,x:Choice<'T,'E>,[<Optional>]_output:Choice<'b,'E>,[<Optional>]_mthd:Apply)= Choice.apply f x : Choice<'U,'E>
37
38
static member inline ``<*>`` (KeyValue(a:'Key,f),KeyValue(b:'Key,x:'T),[<Optional>]_output:KeyValuePair<'Key,'U>,[<Optional>]_mthd:Apply):KeyValuePair<'Key,'U>= KeyValuePair (Plus.Invoke a b, f x)
@@ -83,6 +84,10 @@ type Lift2 =
83
84
#endif
84
85
static memberLift2(f,(x ,y ),_mthd:Lift2)= Async.map2 f x y
85
86
static memberLift2(f,(x ,y ),_mthd:Lift2)= Option.map2 f x y
87
+
88
+
#if!FABLE_COMPILER
89
+
static memberLift2(f,(x ,y ),_mthd:Lift2)= ValueOption.map2 f x y
90
+
#endif
86
91
static memberLift2(f,(x:Result<'T,'Error>,y:Result<'U,'Error>),_mthd:Lift2)= Result.map2 f x y
87
92
static memberLift2(f,(x:Choice<'T,'Error>,y:Choice<'U,'Error>),_mthd:Lift2)= Choice.map2 f x y
88
93
static memberLift2(f,(x:Map<'Key,'T>,y :Map<'Key,'U>),_mthd:Lift2)= Map.mapValues2 f x y
@@ -121,6 +126,10 @@ type Lift3 =
121
126
#endif
122
127
static memberLift3(f,(x ,y ,z ),_mthd:Lift3)= Async.map3 f x y z
123
128
static memberLift3(f,(x ,y ,z ),_mthd:Lift3)= Option.map3 f x y z
129
+
130
+
#if!FABLE_COMPILER
131
+
static memberLift3(f,(x ,y ,z ),_mthd:Lift3)= ValueOption.map3 f x y z
132
+
#endif
124
133
static memberLift3(f,(x:Result<'T,'Error>,y:Result<'U,'Error>,z:Result<'V,'Error>),_mthd:Lift3)= Result.map3 f x y z
125
134
static memberLift3(f,(x:Choice<'T,'Error>,y:Choice<'U,'Error>,z:Choice<'V,'Error>),_mthd:Lift3)= Choice.map3 f x y z
126
135
static memberLift3(f,(x:Map<'Key,'T>,y:Map<'Key,'U>,z:Map<'Key,'V>),_mthd:Lift3)= Map.mapValues3 f x y z
0 commit comments