Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Has Anyone Ever Flipped Heads 76 Times in a Row?.
enum Side { Heads, Tails }
void Main() { Func<Side> generator = () => { return Side.Heads; };
int heads = 0;
while (heads < 76) { if (generator() == Side.Heads) ++heads; else heads = 0; }
Console.WriteLine("Got {0} heads in row.", heads); }
enum Side { Heads, Tails }
void Main() { Func<Side> generator = () => { return Side.Heads; };
int heads = 0;
while (heads < 76) { if (generator() == Side.Heads) ++heads; else heads = 0; }
Console.WriteLine("Got {0} heads in row.", heads); }