@@ -20,8 +20,6 @@ public T Prop {
20
20
21
21
public T Id ( T x ) { throw null ; }
22
22
23
- public T Transform ( int x , T y ) { throw null ; }
24
-
25
23
public S Transform < S > ( S x ) { throw null ; }
26
24
27
25
public void Set ( T x ) { throw null ; }
@@ -32,18 +30,31 @@ public T Prop {
32
30
public void Set < S > ( S x ) { throw null ; }
33
31
34
32
public int Apply ( Func < T , int > f ) { throw null ; }
35
- }
36
33
37
- public class Theorems2 {
34
+ public IList < T > GetMany ( ) { throw null ; }
38
35
39
- public T Transform < T > ( T x ) { throw null ; }
36
+ public void AddMany ( IEnumerable < T > xs ) { throw null ; }
40
37
}
41
38
39
+ // It is assumed that this is a collection with elements of type T.
42
40
public class CollectionTheorems1 < T > : IEnumerable < T > {
43
41
IEnumerator < T > IEnumerable < T > . GetEnumerator ( ) { throw null ; }
44
42
IEnumerator IEnumerable . GetEnumerator ( ) { throw null ; }
45
43
46
44
public T First ( ) { throw null ; }
47
45
48
46
public void Add ( T x ) { throw null ; }
47
+
48
+ public ICollection < T > GetMany ( ) { throw null ; }
49
+
50
+ public void AddMany ( IEnumerable < T > x ) { throw null ; }
51
+ }
52
+
53
+ // It is assumed that this is NOT a collection with elements of type T.
54
+ public class CollectionTheorems2 < T > : IEnumerable {
55
+ IEnumerator IEnumerable . GetEnumerator ( ) { throw null ; }
56
+
57
+ public T Get ( ) { throw null ; }
58
+
59
+ public void Set ( T x ) { throw null ; }
49
60
}
0 commit comments