5
5
6
6
namespace Summaries ;
7
7
8
- public class Theorems1 < T > {
8
+ public class TypeBasedSimple < T > {
9
9
10
10
public T Prop {
11
11
get { throw null ; }
12
12
set { throw null ; }
13
13
}
14
14
15
- public Theorems1 ( T t ) { throw null ; }
15
+ public TypeBasedSimple ( T t ) { throw null ; }
16
16
17
17
public T Get ( ) { throw null ; }
18
18
19
19
public T Get ( object x ) { throw null ; }
20
20
21
21
public T Id ( T x ) { throw null ; }
22
22
23
- public S Transform < S > ( S x ) { throw null ; }
23
+ public S Id < S > ( S x ) { throw null ; }
24
24
25
25
public void Set ( T x ) { throw null ; }
26
26
27
27
public void Set ( int x , T y ) { throw null ; }
28
28
29
- // No summary as S is unrelated to T
30
- public void Set < S > ( S x ) { throw null ; }
29
+ public void Set < S > ( S x ) { throw null ; } // No summary as S is unrelated to T
30
+ }
31
31
32
- public IList < T > GetMany ( ) { throw null ; }
32
+ public class TypeBasedComplex < T > {
33
33
34
34
public void AddMany ( IEnumerable < T > xs ) { throw null ; }
35
35
@@ -39,35 +39,37 @@ public T Prop {
39
39
40
40
public T2 Apply < T1 , T2 > ( T1 x , Func < T1 , T2 > f ) { throw null ; }
41
41
42
- public S Map < S > ( Func < T , S > f ) { throw null ; }
42
+ public TypeBasedComplex < T > FlatMap ( Func < T , IEnumerable < T > > f ) { throw null ; }
43
43
44
- public Theorems1 < S > MapTheorem < S > ( Func < T , S > f ) { throw null ; }
44
+ public TypeBasedComplex < S > FlatMap < S > ( Func < T , IEnumerable < S > > f ) { throw null ; }
45
45
46
- public Theorems1 < S > FlatMap < S > ( Func < T , IEnumerable < S > > f ) { throw null ; }
46
+ public IList < T > GetMany ( ) { throw null ; }
47
47
48
- public Theorems1 < T > FlatMap ( Func < T , IEnumerable < T > > f ) { throw null ; }
48
+ public S Map < S > ( Func < T , S > f ) { throw null ; }
49
+
50
+ public TypeBasedComplex < S > MapComplex < S > ( Func < T , S > f ) { throw null ; }
49
51
50
- public Theorems1 < T > Return ( Func < T , Theorems1 < T > > f ) { throw null ; }
52
+ public TypeBasedComplex < T > Return ( Func < T , TypeBasedComplex < T > > f ) { throw null ; }
51
53
// Examples still not working:
52
54
// public void Set(int x, Func<int, T> f) { throw null;}
53
55
}
54
56
55
57
// It is assumed that this is a collection with elements of type T.
56
- public class CollectionTheorems1 < T > : IEnumerable < T > {
58
+ public class TypeBasedCollection < T > : IEnumerable < T > {
57
59
IEnumerator < T > IEnumerable < T > . GetEnumerator ( ) { throw null ; }
58
60
IEnumerator IEnumerable . GetEnumerator ( ) { throw null ; }
59
61
60
- public T First ( ) { throw null ; }
61
-
62
62
public void Add ( T x ) { throw null ; }
63
63
64
- public ICollection < T > GetMany ( ) { throw null ; }
65
-
66
64
public void AddMany ( IEnumerable < T > x ) { throw null ; }
65
+
66
+ public T First ( ) { throw null ; }
67
+
68
+ public ICollection < T > GetMany ( ) { throw null ; }
67
69
}
68
70
69
71
// It is assumed that this is NOT a collection with elements of type T.
70
- public class CollectionTheorems2 < T > : IEnumerable {
72
+ public class TypeBasedNoCollection < T > : IEnumerable {
71
73
IEnumerator IEnumerable . GetEnumerator ( ) { throw null ; }
72
74
73
75
public T Get ( ) { throw null ; }
0 commit comments