xxxxxxxxxx
import std.parallelism;
int main(string[] args)
{
static int f(bool cond)(int a, int b)
{
static if (cond)
return a+b;
else
return a-b;
}
template getF(alias func)
{
auto getF(T)(T arg)
{
if (args.length > 1)
return func!(f!true)(arg);
else
return func!(f!false)(arg);
}
}
auto res = getF!(taskPool.reduce)([1,2,3]);
return 0;
}