April 1, 2012
[updated] Functional programming language for C programmers and friends
Just for you:
module main { import std (range); import std.io (printf, IO); /* print the Fahrenheit-Celcius table for fahr = 0, 20, ..., 300 */ function main(mutable IO io) { Int lower = 0; // lower bound Int upper = 300; // upper bound Int step = 20; // step for (Int fahr in range(lower, upper, step)) { Double celcius = 5 * (fahr - 32) / 9; std.io.printf(io, "%3d\t%6.
...
Read more 》