@@ -12,24 +12,24 @@ open FSharpPlus.Internals
12
12
13
13
type OfSeq =
14
14
inherit Default1
15
-
16
- static member inline OfSeq (( x : seq < 't >, _ : 'R ), _ : Default5 ) : 'R =
15
+
16
+ static member inline OfSeq (( x : seq < 't >, _ : '``Foldable' < T > `` ), _ : Default5 ) : '``Foldable' < T > `` =
17
17
#if TEST_ TRACE
18
- Traces.add " OfSeq, Default5-seq <'t>"
18
+ Traces.add " OfSeq, Return+Sum <'t>"
19
19
#endif
20
- ( ^R : ( new : seq < 't > -> ^R ) x )
20
+ x |> Seq.map Return.Invoke |> Sum.Invoke
21
21
22
- static member inline OfSeq (( x : seq < KeyValuePair < 'k , 'v >> , _ : 'R ), _ : Default5 ) : 'R =
22
+ static member inline OfSeq (( x : seq < 't > , _ : 'R ), _ : Default4 ) : 'R =
23
23
#if TEST_ TRACE
24
- Traces.add " OfSeq, Default5- seq<KeyValuePair<'k,'v> >"
24
+ Traces.add " OfSeq, #new seq<'t >"
25
25
#endif
26
- ( ^R : ( new : seq< 'k * 'v > -> ^R ) ( Seq.map (| KeyValue |) x ) )
26
+ ( ^R : ( new : seq< 't > -> ^R ) x )
27
27
28
- static member inline OfSeq (( x : seq < 't > , _ : '``Foldable' < T > `` ), _ : Default4 ) : '``Foldable' < T > `` =
28
+ static member inline OfSeq (( x : seq < KeyValuePair < 'k , 'v >> , _ : 'R ), _ : Default4 ) : 'R =
29
29
#if TEST_ TRACE
30
- Traces.add " OfSeq, Default4- seq<'t >"
30
+ Traces.add " OfSeq, #new seq<KeyValuePair<'k,'v> >"
31
31
#endif
32
- x |> Seq.map Return.Invoke |> Sum.Invoke
32
+ ( ^R : ( new : seq < 'k * 'v > -> ^R ) ( Seq.map (| KeyValue |) x ))
33
33
34
34
static member OfSeq (( x : seq < 't > , _ : seq < 't > ), _ : Default3 ) = x
35
35
static member OfSeq (( x : seq < 't > , _ : ICollection < 't > ), _ : Default3 ) = let d = ResizeArray () in Seq.iter d.Add x; d :> ICollection< 't>
@@ -81,10 +81,10 @@ type OfSeq =
81
81
type OfList =
82
82
inherit Default1
83
83
84
- static member inline OfList (( x : list < 't > , _ : 'R ), _ : Default6 ) = ( ^R : ( new : seq< 't> -> ^R ) ( List.toSeq x)) : 'R
85
- static member inline OfList (( x : list < KeyValuePair < 'k , 'v >>, _ : 'R ), _ : Default6 ) = ( ^R : ( new : seq< 'k* 'v> -> ^R ) ( Seq.map (| KeyValue|) x)) : 'R
84
+ static member inline OfList (( x : list < 't > , _ : '``Foldable' < T > `` ), _ : Default6 ) = x |> List.map Return.Invoke |> Sum.Invoke : '`` Foldable'<T> ``
86
85
87
- static member inline OfList (( x : list < 't > , _ : '``Foldable' < T > `` ), _ : Default5 ) = x |> List.map Return.Invoke |> Sum.Invoke : '`` Foldable'<T> ``
86
+ static member inline OfList (( x : list < 't > , _ : 'R ), _ : Default5 ) = ( ^R : ( new : seq< 't> -> ^R ) ( List.toSeq x)) : 'R
87
+ static member inline OfList (( x : list < KeyValuePair < 'k , 'v >>, _ : 'R ), _ : Default5 ) = ( ^R : ( new : seq< 'k* 'v> -> ^R ) ( Seq.map (| KeyValue|) x)) : 'R
88
88
89
89
static member OfList (( x : list < 't > , _ : seq < 't > ), _ : Default4 ) = List.toSeq x
90
90
#if ! FABLE_ COMPILER
0 commit comments