sub grey { $b=shift; for $c (0..2**$b-1){for(-$b..-1){ $l[$c].=($c&1<<-$_-1)>>-$_-1^($c&1<<-$_)>>-$_;}} return \@l; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (Golf) Grey code
by no_slogan (Deacon) on Jul 28, 2001 at 04:21 UTC | |
|
Re: (Golf) Grey code
by abstracts (Hermit) on Jul 28, 2001 at 04:11 UTC | |
by Everlasting God (Beadle) on Jul 28, 2001 at 06:55 UTC | |
|
(MeowChow) Re: (Golf) Grey code
by MeowChow (Vicar) on Jul 28, 2001 at 04:15 UTC |