D version

This commit is contained in:
FraMecca 2017-07-17 13:03:46 +02:00
parent 71b8d4234e
commit 92ffd123e3

23
asino.d Normal file
View file

@ -0,0 +1,23 @@
import std.stdio;
import std.random;
import std.getopt;
void
main (string[] args)
{
bool num;
auto cliOpts = getopt (
args,
"no-numbers|n", "disable number output on screen", &num);
args = args[1 .. $];
Mt19937 gen;
gen.seed (unpredictableSeed);
randomShuffle (args);
foreach (i, arg; args) {
if (num) writeln (arg);
else writefln ("%s: %s", i, arg);
}
}