úÎ Ò |portable experimentalamy@nualeargais.ie Safe-Inferred k2 generates the list of Binary Reflected Gray Code 4 (BRGC) numbers of length k. This code is cyclic.  n encodes n using a BRGC, and returns the 7 resulting bits as an integer. For example, encoding 17 in BRGC  results in 11001 , or 25. So integralToGray 17 returns 25.  n decodes n using a BRGC, and returns the ) resulting integer. For example, 25 is 11001, which is the code  for 17. So grayToIntegral 25 returns 17.  xs k. generates a non-Boolean (or n-ary) Gray code  of length k using the elements of xs as "digits" . This code  is cyclic. Ex:  "012" 4$ generates a ternary Gray code that  is four digits long. Shift elements right. gray-extended-1.5 Codec.Gray grayCodesintegralToGraygrayToIntegral naryGrayCodesshiftprefixAndShift