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

Reply via email to