aboutsummaryrefslogtreecommitdiff
path: root/challenge-070/richard-park/apl/GrayCodeSequence.aplf
blob: 54e9b87e0e509cedca9ce3b7a016794ed4b2af9d (plain)
1
2
3
4
5
6
 GrayCodeSequence{
⍝ Generate ⍵-bit Gray Code Sequence
⍝ ⍵ ≥ 2
     0 1 3 2
     {2(0⍪,1⍪⌽)2¯1}(-2)
 }