a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
28 lines
368 B
C#
28 lines
368 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
public delegate int Int2Int (int i);
|
|
|
|
public class FunEnumerable
|
|
{
|
|
int size;
|
|
Int2Int f;
|
|
|
|
public FunEnumerable(int size, Int2Int f)
|
|
{
|
|
this.size = size; this.f = f;
|
|
}
|
|
|
|
public IEnumerator<int> GetEnumerator()
|
|
{
|
|
yield return f (size);
|
|
}
|
|
}
|
|
|
|
class X
|
|
{
|
|
public static void Main ()
|
|
{ }
|
|
}
|