http://d.puremagic.com/issues/show_bug.cgi?id=6419
ponce <alil...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alil...@gmail.com --- Comment #6 from ponce <alil...@gmail.com> 2012-07-02 12:32:26 PDT --- This is sad because you can't do compile-time FizzBuzz :) ------------------- import std.stdio, std.conv, std.range, std.algorithm; void main() { enum fizzbuzz = iota(1, 100) .map!(x => (0 == x % 15) ? "FizzBuzz" : (0 == x % 5) ? "Buzz" : (0 == x % 3) ? "Fizz" : to!string(x)) .joiner("\n"); writeln(fizzbuzz); } ------------------- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------