A little of coordination for Rosettacode

FG home at fgda.pl
Wed Feb 27 03:55:20 PST 2013


On 2013-02-27 12:47, FG wrote:
> On 2013-02-26 15:10, bearophile wrote:
>> This third version is much simpler and it seems good enough for
>> Rosettacode:
>>
>> http://codepad.org/YJjb1t91
>
> Nice. Myself I'd add bits.reverse; after the N.iota.map..., because I'm more
> used to a truth table where the left-most operands iterate the slowest.

or, without reverse, but perhaps not very clear:
N.iota.map!(j => !!(i & (1 << (N - j - 1)))).copy(bits[]);



More information about the Digitalmars-d-learn mailing list