Carmack about static analysis
bearophile
bearophileHUGS at lycos.com
Sun Dec 25 15:30:28 PST 2011
Timon Gehr:
> > http://pastebin.com/C6vf9DQQ
If possible I suggest to remove all the BigInt from the module, and put the bigint import into the main():
void main() {
import std.bigint;
auto h = hamming!BigInt();
writeln(take(20, h));
writeln(h()[1_691]);
writeln(h()[1_000_000]);
}
> @nonstrict:
>
> r=cast(T)1
> .cons(
> r.map((a)=> 2*a)
> .merge(r.map((a)=> 3*a))
> .merge(r.map((a)=> 5*a))
> );
This version looks acceptable :-)
Bye,
bearophile
More information about the Digitalmars-d
mailing list