1 public delegate TResult Func
<TResult
> ();
3 public delegate void GeneratorNext
<T
> (ref T current
);
5 public class GeneratorEnumerable
<T
>
7 public GeneratorEnumerable (Func
<GeneratorNext
<T
>> next
) { }
10 public class GeneratorExpression { }
12 public class GeneratorInvoker
14 public GeneratorInvoker (GeneratorExpression generator
) { }
15 public void Invoke
<T
> (ref T current
) { }
18 public static class Interpreter
20 public static object InterpretGenerator
<T
> (GeneratorExpression generator
)
22 return new GeneratorEnumerable
<T
> (
23 () => new GeneratorInvoker (generator
).Invoke
27 public static int Main ()
29 InterpretGenerator
<int> (new GeneratorExpression ());