3 using System
.Collections
;
4 using System
.Collections
.Generic
;
6 public static class IEnumerableTransform
9 public static IEnumerable
<TOut
> Transform
<TOut
> (this IEnumerable
<int> input
, EmitterFunc
<TOut
> rule
)
11 foreach (var v
in input
) {
18 public static EmitterFunc
<TOut
> Emit
<TOut
> (TOut result
)
20 return delegate (out TOut output
) {
25 public delegate void EmitterFunc
<TOut
> (out TOut output
);
27 public static int Main ()
29 IEnumerable
<int> arr
= new int[3];
30 if (!arr
.Transform
<char> (IEnumerableTransform
.Emit
<char> ('t')).SequenceEqual(new char[] { 't', 't', 't'}
))