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/Control/Applicative.fs
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,12 @@ type Apply =
37
37
static member ``<*>`` ((f:Result<_,'E>,x:Result<'T,'E>),_output:Result<'b,'E>,[<Optional>]_mthd:Apply)= Result.apply f x : Result<'U,'E>
38
38
static member ``<*>`` ((f:Choice<_,'E>,x:Choice<'T,'E>),_output:Choice<'b,'E>,[<Optional>]_mthd:Apply)= Choice.apply f x : Choice<'U,'E>
39
39
static member inline ``<*>`` ((KeyValue(a:'Key,f),KeyValue(b:'Key,x:'T)),_output:KeyValuePair<'Key,'U>,[<Optional>]_mthd:Default3):KeyValuePair<'Key,'U>= KeyValuePair (Plus.Invoke a b, f x)
40
-
static member inline ``<*>`` ((_:DmStruct2<'Key,_>,_:DmStruct2<'Key,'T>),_output:DmStruct2<'Key,'U>,[<Optional>]_mthd:Default3):DmStruct2<'Key,'U>= Unchecked.defaultof<DmStruct2<'Key,'U>>
40
+
static member inline ``<*>`` ((f:KeyValuePair2<'Key,_>,x:KeyValuePair2<'Key,'T>),_output:KeyValuePair2<'Key,'U>,[<Optional>]_mthd:Default3):KeyValuePair2<'Key,'U>=
41
+
leta= f.Key
42
+
letb= x.Key
43
+
letf= f.Value
44
+
letx= x.Value
45
+
KeyValuePair2 (Plus.Invoke a b, f x)
41
46
42
47
static member ``<*>`` ((f:Map<'Key,_>,x:Map<'Key,'T>),_output:Map<'Key,'U>,[<Optional>]_mthd:Apply):Map<'Key,'U>= Map (seq{
43
48
for KeyValue(k, vf)in f do
@@ -60,7 +65,7 @@ type Apply =
60
65
|true, vx -> dct.Add (k, vf vx)
61
66
|_->()
62
67
dct :> IDictionary<'Key,'U>
63
-
68
+
64
69
static member ``<*>`` ((f:IReadOnlyDictionary<'Key,_>,x:IReadOnlyDictionary<'Key,'T>),_output:IReadOnlyDictionary<'Key,'U>,[<Optional>]_mthd:Apply):IReadOnlyDictionary<'Key,'U>=
65
70
letdct= Dictionary ()
66
71
for KeyValue(k, vf)in f do
@@ -73,7 +78,7 @@ type Apply =
73
78
static member ``<*>`` ((f:Expr<'T->'U>,x:Expr<'T>),_output:Expr<'U>,[<Optional>]_mthd:Apply)= Expr.Cast<'U>(Expr.Application (f, x))
74
79
#endif
75
80
static member ``<*>`` ((f:('T->'U) ResizeArray,x:'T ResizeArray),_output:'U ResizeArray,[<Optional>]_mthd:Apply)= ResizeArray.apply f x : 'U ResizeArray
76
-
81
+
77
82
static member inlineInvoke(f:'``Applicative<'T->'U>``)(x:'``Applicative<'T>``):'``Applicative<'U>`` =
78
83
let inlinecall(mthd :^M,input1:^I1,input2:^I2,output:^R)=
79
84
((^Mor^I1or^I2or^R):(static member ``<*>`` :(_*_)*_*_ -> _)(input1,input2),output,mthd)
0 commit comments