Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 deletions

View file

@ -0,0 +1,13 @@
void main() {
import std.stdio, std.algorithm, std.range, std.numeric,
std.conv, std.typecons, std.typetuple;
auto list = iota(1, 11);
alias ops = TypeTuple!(q{a + b}, q{a * b}, min, max, gcd);
foreach (op; ops)
writeln(op.stringof, ": ", list.reduce!op);
// std.algorithm.reduce supports multiple functions in parallel:
reduce!(ops[0], ops[3], text)(tuple(0, 0.0, ""), list).writeln;
}