dlang-book/book/05-данные-и-функции-функциональный-стиль/src/chapter-5-10-2-1/app.d

21 lines
288 B
D

import std.conv;
import std.stdio : stdout;
void write(T...)(T args)
{
foreach (arg; args)
{
stdout.rawWrite(to!string(arg));
}
}
void writeln(T...)(T args)
{
write(args, '\n');
stdout.flush();
}
void main()
{
writeln(5, "здравствуй", 4.2);
}