in reply to Re: Decimal Gray Code in 31 chars
in thread Decimal Gray Code in 31 chars

I also get for:

perl -E'print$_^$_/2for 0..pop' 15

Output:

0132675412131514101198

But for:

perl -E'say$_^$_/2for 0..pop' 15

I get:

0 1 3 2 6 7 5 4 12 13 15 14 10 11 9 8

I believe that was mtve's intent. Um, that's 20 chars of actual code.

Replies are listed 'Best First'.
Re^3: Decimal Gray Code in 31 chars
by ambrus (Abbot) on Jan 27, 2010 at 09:32 UTC

    Actually my guess is rather perl -le'print$_^$_/2for 0..pop'