Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -1,12 +1,12 @@
import std.stdio, std.algorithm, std.range;
T multifactorial(T=long)(in int n, in int m) /*pure*/ {
T multifactorial(T=long)(in int n, in int m) pure /*nothrow*/ {
T one = 1;
return reduce!q{a * b}(one, iota(n, 0, -m));
}
void main() {
foreach (m; 1 .. 11)
foreach (immutable m; 1 .. 11)
writefln("%2d: %s", m, iota(1, 11)
.map!(n => multifactorial(n, m))());
.map!(n => multifactorial(n, m)));
}