March 2014 update

This commit is contained in:
Ingy döt Net 2014-04-02 16:56:35 +00:00
parent 09687c4926
commit a25938f123
1846 changed files with 21876 additions and 5203 deletions

View file

@ -1,14 +1,14 @@
import std.stdio, std.algorithm, std.range;
/*auto*/ int male(in int n) pure nothrow {
return n ? (n - female(male(n - 1))) : 0;
int male(in int n) pure nothrow {
return n ? n - male(n - 1).female : 0;
}
/*auto*/ int female(in int n) pure nothrow {
return n ? (n - male(female(n - 1))) : 1;
int female(in int n) pure nothrow {
return n ? n - female(n - 1).male : 1;
}
void main() {
iota(20).map!female().writeln();
iota(20).map!male().writeln();
20.iota.map!female.writeln;
20.iota.map!male.writeln;
}