ネタ元 → どんだけ~? のコメント:
10.times {
...
}
なRubyは勝ち組ですか?
なんか悔しいから真似してみるぉ
// C# 3.0 拡張メソッド濫用のココロミ
namespace Wankuma {
public static class OverUse {
public static void times(this int n, System.Action<int> act) {
for ( int i = 0; i < n; ++i ) act(i);
}
}
public class Program {
public static void Main() {
10.times(n => System.Console.WriteLine("ピザ"));
}
}
}
あら、できちゃうのね♪
10て... intだかuintだかlongだかわからんやんかー とかゴネたりしないんだ。
・)」 ← ここは?