@@ -20,8 +20,6 @@ public T Prop {
2020
2121 public T Id ( T x ) { throw null ; }
2222
23- public T Transform ( int x , T y ) { throw null ; }
24-
2523 public S Transform < S > ( S x ) { throw null ; }
2624
2725 public void Set ( T x ) { throw null ; }
@@ -32,18 +30,31 @@ public T Prop {
3230 public void Set < S > ( S x ) { throw null ; }
3331
3432 public int Apply ( Func < T , int > f ) { throw null ; }
35- }
3633
37- public class Theorems2 {
34+ public IList < T > GetMany ( ) { throw null ; }
3835
39- public T Transform < T > ( T x ) { throw null ; }
36+ public void AddMany ( IEnumerable < T > xs ) { throw null ; }
4037}
4138
39+ // It is assumed that this is a collection with elements of type T.
4240public class CollectionTheorems1 < T > : IEnumerable < T > {
4341 IEnumerator < T > IEnumerable < T > . GetEnumerator ( ) { throw null ; }
4442 IEnumerator IEnumerable . GetEnumerator ( ) { throw null ; }
4543
4644 public T First ( ) { throw null ; }
4745
4846 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 ; }
4960}
0 commit comments